Fix NPE in YangTextSchemaSourceSerializationProxy#getRepresentation
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / schema / provider / impl / YangTextSchemaSourceSerializationProxy.java
index 6e6c6a8..39302e4 100644 (file)
@@ -34,7 +34,7 @@ public class YangTextSchemaSourceSerializationProxy implements Serializable {
     }
 
     public YangTextSchemaSource getRepresentation() {
-        return YangTextSchemaSource.delegateForByteSource(RevisionSourceIdentifier.create(name, Optional.of(revision)),
-            ByteSource.wrap(schemaSource));
+        return YangTextSchemaSource.delegateForByteSource(
+                RevisionSourceIdentifier.create(name, Optional.fromNullable(revision)), ByteSource.wrap(schemaSource));
     }
 }