Added Support for conversion yang binary type to java type;
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-generator-impl / src / main / java / org / opendaylight / controller / sal / binding / yang / types / TypeProviderImpl.java
index b3739ec5c44d5812a708139603cd4104ff738d67..03824efed06ed868709cf696e96d231e74a57c12 100644 (file)
@@ -87,12 +87,10 @@ public final class TypeProviderImpl implements TypeProvider {
             throw new IllegalArgumentException("Type Definition cannot be " +
                     "NULL!");
         }
-
         if (typeDefinition.getQName() == null) {
             throw new IllegalArgumentException("Type Definition cannot have " +
                     "non specified QName (QName cannot be NULL!)");
         }
-
         if (typeDefinition.getQName().getLocalName() == null) {
             throw new IllegalArgumentException("Type Definitions Local Name " +
                     "cannot be NULL!");
@@ -136,6 +134,12 @@ public final class TypeProviderImpl implements TypeProvider {
                         .javaTypeForSchemaDefinitionType(typeDefinition);
             }
         }
+        //TODO: add throw exception when we will be able to resolve ALL yang
+        // types!
+//        if (returnType == null) {
+//            throw new IllegalArgumentException("Type Provider can't resolve " +
+//                    "type for specified Type Definition " + typedefName);
+//        }
         return returnType;
     }