Merge "NETCONF-557: Add support for URL capability"
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / schemacache / SchemaSourceCache.java
index 9ac7b647c0b22412c507331bb752145094809819..c038b6bc6bd525397332d9c60b38814f651d9543 100644 (file)
@@ -76,13 +76,14 @@ public final class SchemaSourceCache<T extends SchemaSourceRepresentation>
 
     @Override
     public synchronized ListenableFuture<? extends T> getSource(final SourceIdentifier sourceIdentifier) {
-        ModelData modelData = cachedSchemas.get(sourceIdentifier.toYangFilename());
+        final String fileName = sourceIdentifier.toYangFilename();
+        ModelData modelData = cachedSchemas.get(fileName);
         if (modelData != null) {
             final SchemaSourceRepresentation restored = restoreAsType(modelData.getId(), modelData.getPath());
             return Futures.immediateFuture(representation.cast(restored));
         }
 
-        LOG.debug("Source {} not found in cache as {}", sourceIdentifier);
+        LOG.debug("Source {} not found in cache as {}", sourceIdentifier, fileName);
         return Futures.immediateFailedFuture(new MissingSchemaSourceException("Source not found", sourceIdentifier));
     }