@@ -51,6 +51,16 @@ public class JarCacheStorage implements HttpCacheStorage {
5151 */
5252 private HttpCacheStorage delegate ;
5353
54+ ObjectMapper mapper = new ObjectMapper ();
55+
56+ /**
57+ * Map from uri of jarcache.json (e.g. jar://blab.jar!jarcache.json) to a
58+ * SoftReference to its content as JsonNode.
59+ *
60+ * @see #getJarCache(URL)
61+ */
62+ protected ConcurrentMap <URI , SoftReference <JsonNode >> jarCaches = new ConcurrentHashMap <URI , SoftReference <JsonNode >>();
63+
5464 public ClassLoader getClassLoader () {
5565 if (classLoader != null ) {
5666 return classLoader ;
@@ -102,8 +112,6 @@ public void putEntry(String key, HttpCacheEntry entry) throws IOException {
102112 delegate .putEntry (key , entry );
103113 }
104114
105- ObjectMapper mapper = new ObjectMapper ();
106-
107115 @ Override
108116 public HttpCacheEntry getEntry (String key ) throws IOException {
109117 log .trace ("Requesting " + key );
@@ -151,14 +159,6 @@ private Enumeration<URL> getResources() throws IOException {
151159 }
152160 }
153161
154- /**
155- * Map from uri of jarcache.json (e.g. jar://blab.jar!jarcache.json) to a
156- * SoftReference to its content as JsonNode.
157- *
158- * @see #getJarCache(URL)
159- */
160- protected ConcurrentMap <URI , SoftReference <JsonNode >> jarCaches = new ConcurrentHashMap <URI , SoftReference <JsonNode >>();
161-
162162 protected JsonNode getJarCache (URL url ) throws IOException , JsonProcessingException {
163163
164164 URI uri ;
0 commit comments