Fixed NPE in URLSchemaContextResolver. 26/4626/1
authorTony Tkacik <ttkacik@cisco.com>
Thu, 23 Jan 2014 08:49:20 +0000 (09:49 +0100)
committerTony Tkacik <ttkacik@cisco.com>
Thu, 23 Jan 2014 08:49:34 +0000 (09:49 +0100)
Change-Id: Ia2dce65ea980d66503dd686a4c61a14466588914
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/URLSchemaContextResolver.java

index 1d190ead690f73066d8ff735e626391bcda882e9..f0f7e401052539192b2b2cb85fba18360ddef0ad 100644 (file)
@@ -33,7 +33,7 @@ public class URLSchemaContextResolver implements AdvancedSchemaSourceProvider<In
     private final ConcurrentMap<SourceIdentifier, SourceContext> availableSources = new ConcurrentHashMap<>();
 
     private YangSourceContext currentSourceContext;
-    private Optional<SchemaContext> currentSchemaContext;
+    private Optional<SchemaContext> currentSchemaContext = Optional.absent();
     
     public Registration<URL> registerSource(URL source) {
         checkArgument(source != null, "Supplied source must not be null");