Drop unneeded generic type specifiers
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / repo / util / FilesystemSchemaSourceCache.java
index f4473859a59b1759e9dfa8625ca6e1fe55681f99..0234cc7759f74bc84e0f65190834da0a32e6c300 100644 (file)
@@ -54,9 +54,14 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
 
     // Init storage adapters
     private static final Map<Class<? extends SchemaSourceRepresentation>, StorageAdapter<? extends SchemaSourceRepresentation>> STORAGE_ADAPTERS =
-            Collections.<Class<? extends SchemaSourceRepresentation>, StorageAdapter<? extends SchemaSourceRepresentation>> singletonMap(
+            Collections.singletonMap(
                     YangTextSchemaSource.class, new YangTextSchemaStorageAdapter());
 
+    private static final Pattern CACHED_FILE_PATTERN =
+            Pattern.compile(
+                    "(?<moduleName>[^@]+)" +
+                    "(@(?<revision>" + SourceIdentifier.REVISION_PATTERN + "))?");
+
     private final Class<T> representation;
     private final File storageDirectory;
 
@@ -90,11 +95,6 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
                 "This cache does not support representation: %s, supported representations are: %s", representation, STORAGE_ADAPTERS.keySet()));
     }
 
-    private static final Pattern CACHED_FILE_PATTERN =
-            Pattern.compile(
-                    "(?<moduleName>[^@]+)" +
-                    "(@(?<revision>" + SourceIdentifier.REVISION_PATTERN + "))?");
-
     /**
      * Restore cache state
      */
@@ -123,7 +123,7 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
         }
 
         LOG.debug("Source {} not found in cache as {}", sourceIdentifier, file);
-        return Futures.<T, SchemaSourceException>immediateFailedCheckedFuture(new MissingSchemaSourceException("Source not found", sourceIdentifier));
+        return Futures.immediateFailedCheckedFuture(new MissingSchemaSourceException("Source not found", sourceIdentifier));
     }
 
     @Override