Sonar suggestions - file name and constants

- moved class files into a directory that complies with Java naming conventions
- extracted a duplicated string literal into a constant

Change-Id: I3d0b1378746ee1c7a3d4e541e9d09943886de312
This commit is contained in:
Ray Milkey 2018-01-03 14:21:30 -08:00 committed by Thomas Vachuska
parent 74f9816e6c
commit 41b5302f93
2 changed files with 9 additions and 7 deletions

View File

@ -41,6 +41,8 @@ import java.util.Map;
@Component(immediate = true)
public class HuaweiModelRegistrator extends AbstractYangModelRegistrator {
private static final String MODEL_VERSION = "2014-12-25";
/**
* Creates L3VPN model registrator.
*/
@ -50,19 +52,19 @@ public class HuaweiModelRegistrator extends AbstractYangModelRegistrator {
private static Map<YangModuleId, AppModuleInfo> getAppInfo() {
Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>();
appInfo.put(new DefaultYangModuleId("ne-bgpcomm", "2014-12-25"),
appInfo.put(new DefaultYangModuleId("ne-bgpcomm", MODEL_VERSION),
new DefaultAppModuleInfo(NeBgpcomm.class, null));
appInfo.put(new DefaultYangModuleId("ne-bgpcomm-type", "2014-12-25"),
appInfo.put(new DefaultYangModuleId("ne-bgpcomm-type", MODEL_VERSION),
new DefaultAppModuleInfo(NeBgpcommType.class, null));
appInfo.put(new DefaultYangModuleId("ne-l3vpn-api", "2014-12-25"),
appInfo.put(new DefaultYangModuleId("ne-l3vpn-api", MODEL_VERSION),
new DefaultAppModuleInfo(NeL3VpnApi.class, null));
appInfo.put(new DefaultYangModuleId("ne-l3vpncomm", "2014-12-25"),
appInfo.put(new DefaultYangModuleId("ne-l3vpncomm", MODEL_VERSION),
new DefaultAppModuleInfo(NeL3Vpncomm.class, null));
appInfo.put(new DefaultYangModuleId("ne-l3vpncomm-type", "2014-12-25"),
appInfo.put(new DefaultYangModuleId("ne-l3vpncomm-type", MODEL_VERSION),
new DefaultAppModuleInfo(NeL3VpncommType.class, null));
appInfo.put(new DefaultYangModuleId("ne-tnlm", "2014-12-25"),
appInfo.put(new DefaultYangModuleId("ne-tnlm", MODEL_VERSION),
new DefaultAppModuleInfo(NeTnlm.class, null));
appInfo.put(new DefaultYangModuleId("ne-tnlm-type", "2014-12-25"),
appInfo.put(new DefaultYangModuleId("ne-tnlm-type", MODEL_VERSION),
new DefaultAppModuleInfo(NeTnlmType.class, null));
return ImmutableMap.copyOf(appInfo);
}