Fix YangParserImpl streaming use 52/80652/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Feb 2019 18:48:44 +0000 (19:48 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 28 Feb 2019 19:23:39 +0000 (19:23 +0000)
We should not be returning null, but "this", fix that.

Change-Id: I0683da43a4c1d0b30f8f7d0680be2aa17f4e05ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/YangParserImpl.java

index c8faca678e132a6f789cf7604d12fb653c99ca88..8a76c6f1af0711081b2bba7f80a1890be54f29bc 100644 (file)
@@ -67,14 +67,14 @@ final class YangParserImpl implements YangParser {
     @Override
     public YangParser addSource(final SchemaSourceRepresentation source) throws IOException, YangSyntaxErrorException {
         buildAction.addSources(sourceToStatementStream(source));
-        return null;
+        return this;
     }
 
     @Override
     public YangParser addLibSource(final SchemaSourceRepresentation source) throws IOException,
             YangSyntaxErrorException {
         buildAction.addLibSources(sourceToStatementStream(source));
-        return null;
+        return this;
     }
 
     @Override