BUG-2159: compilation failure with generics 18/11818/1
authorRobert Varga <rovarga@cisco.com>
Wed, 8 Oct 2014 16:12:29 +0000 (18:12 +0200)
committerRobert Varga <rovarga@cisco.com>
Wed, 8 Oct 2014 16:12:29 +0000 (18:12 +0200)
http://mail.openjdk.java.net/pipermail/compiler-dev/2013-October/007726.html
seems to be describing why this patch is needed.

Change-Id: Ib23f51e0f319327c3c6a04ff86fb4c89b745e4ae
Signed-off-by: Robert Varga <rovarga@cisco.com>
code-generator/binding-data-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/ChoiceNodeCodecContext.java

index bac768703c24cab5f00e1b13014143f9b5fcf218..ca79b879bba5135509fa9bd44085fddb637b7ea5 100644 (file)
@@ -43,7 +43,7 @@ final class ChoiceNodeCodecContext extends DataContainerCodecContext<ChoiceNode>
         Map<Class<?>, DataContainerCodecPrototype<?>> byCaseChildClassBuilder = new HashMap<>();
         Set<Class<?>> potentialSubstitutions = new HashSet<>();
         // Walks all cases for supplied choice in current runtime context
-        for (Class<?> caze : factory().getRuntimeContext().getCases(bindingClass())) {
+        for (Class caze : factory().getRuntimeContext().getCases(bindingClass())) {
             // We try to load case using exact match thus name
             // and original schema must equals
             DataContainerCodecPrototype<ChoiceCaseNode> cazeDef = loadCase(caze);
@@ -52,7 +52,7 @@ final class ChoiceNodeCodecContext extends DataContainerCodecContext<ChoiceNode>
             if (cazeDef != null) {
                 byClassBuilder.put(cazeDef.getBindingClass(), cazeDef);
                 // Updates collection of case children
-                for (Class<? extends DataObject> cazeChild : BindingReflections.getChildrenClasses((Class) caze)) {
+                for (Class<? extends DataObject> cazeChild : BindingReflections.getChildrenClasses((Class<? extends DataObject>) caze)) {
                     byCaseChildClassBuilder.put(cazeChild, cazeDef);
                 }
                 // Updates collection of YANG instance identifier to case
@@ -145,4 +145,4 @@ final class ChoiceNodeCodecContext extends DataContainerCodecContext<ChoiceNode>
         return byCaseChildClass.get(type).get();
     }
 
-}
\ No newline at end of file
+}