PathMatchingResourcePatternResolver preserves caching for JNLP jar connections (SPR-9117)

master
Juergen Hoeller 13 years ago
parent 81861ca7a8
commit fe57f74c1a
  1. 4
      org.springframework.core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2010 the original author or authors. * Copyright 2002-2012 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -433,7 +433,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
if (con instanceof JarURLConnection) { if (con instanceof JarURLConnection) {
// Should usually be the case for traditional JAR files. // Should usually be the case for traditional JAR files.
JarURLConnection jarCon = (JarURLConnection) con; JarURLConnection jarCon = (JarURLConnection) con;
jarCon.setUseCaches(false); jarCon.setUseCaches(jarCon.getClass().getName().startsWith("JNLP"));
jarFile = jarCon.getJarFile(); jarFile = jarCon.getJarFile();
jarFileUrl = jarCon.getJarFileURL().toExternalForm(); jarFileUrl = jarCon.getJarFileURL().toExternalForm();
JarEntry jarEntry = jarCon.getJarEntry(); JarEntry jarEntry = jarCon.getJarEntry();

Loading…
Cancel
Save