Bug 8153: enforce check-style rules for netconf
[netconf.git] / netconf / tools / netconf-cli / src / main / java / org / opendaylight / netconf / cli / reader / impl / UnionTypeReader.java
index 7575a4b0b2f272596771511bc3b7cbba62cb6f66..5a899b5983df59105967543740db8ad5fd88e1ab 100644 (file)
@@ -32,7 +32,7 @@ class UnionTypeReader {
 
     private final ConsoleIO console;
 
-    public UnionTypeReader(final ConsoleIO console) {
+    UnionTypeReader(final ConsoleIO console) {
         this.console = console;
     }
 
@@ -50,9 +50,10 @@ class UnionTypeReader {
             }
             final TypeDefinition<?> value = mapping.get(rawValue);
             if (value != null) {
-                return Optional.<TypeDefinition<?>> of(value);
+                return Optional.of(value);
             } else {
-                final String message = String.format("Incorrect type (%s) was specified for union type definition", rawValue);
+                final String message = String.format(
+                    "Incorrect type (%s) was specified for union type definition", rawValue);
                 LOG.error(message);
                 throw new ReadingException(message);
             }
@@ -70,7 +71,7 @@ class UnionTypeReader {
         private final TypeDefinition<?> typeDef;
         private final Map<String, TypeDefinition<?>> menuItemsToTypeDefinitions = new HashMap<>();
 
-        public UnionConsoleContext(final TypeDefinition<?> typeDef) {
+        UnionConsoleContext(final TypeDefinition<?> typeDef) {
             this.typeDef = typeDef;
         }
 
@@ -83,7 +84,7 @@ class UnionTypeReader {
         public Completer getCompleter() {
             List<TypeDefinition<?>> subtypesForMenu = resolveSubtypesFrom(typeDef);
             if (subtypesForMenu.isEmpty()) {
-                subtypesForMenu = Collections.<TypeDefinition<?>> singletonList(typeDef);
+                subtypesForMenu = Collections.singletonList(typeDef);
             }
             final Collection<String> menuItems = toMenuItem(subtypesForMenu);
             return new AggregateCompleter(new StringsCompleter(menuItems), new StringsCompleter(IOUtil.SKIP));
@@ -104,7 +105,6 @@ class UnionTypeReader {
         }
 
         /**
-         *
          * If union type is found in potentialEndTypeCandidate as subtype then
          * it these subtypes become candidates.
          *