Adjust to yangtools-2.0.0 changes
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / MissingSchemaException.java
index d66fd335da2097bd93ff08b96e47f1dbe925bd6d..3634d7ff4932dffd1574fe309114c4c26d749ca4 100644 (file)
@@ -34,7 +34,7 @@ public class MissingSchemaException extends IllegalArgumentException {
     }
 
     static void checkModulePresent(final SchemaContext schemaContext, final QName name) {
-        if (schemaContext.findModuleByNamespaceAndRevision(name.getNamespace(), name.getRevision()) == null) {
+        if (!schemaContext.findModule(name.getModule()).isPresent()) {
             throw MissingSchemaException.create("Module %s is not present in current schema context.",
                 name.getModule());
         }