Przeglądaj źródła

fixes Issue #271

tags/rel_3_26_0_ga
chibash 4 lat temu
rodzic
commit
f7ef31ce8b

+ 1
- 1
Readme.html Wyświetl plik

@@ -283,7 +283,7 @@ see javassist.Dump.

<p>-version 3.26
<ul>
<li>GitHub Issue #270 (PR #272), Issue #265 (PR #267).
<li>GitHub Issue #270 (PR #272), Issue #265 (PR #267), Issue #271 and #222.
</ul>

<p>-version 3.25 on April 16, 2019

+ 8
- 0
src/main/javassist/ClassPool.java Wyświetl plik

@@ -113,6 +113,14 @@ public class ClassPool {
*/
public static boolean releaseUnmodifiedClassFile = true;

/**
* If true, the contents of a jar file are cached after the jar
* file is opened.
*
* <p>The initial value is true.
*/
public static boolean cacheOpenedJarFile = true; // see ClassPoolTail.JarClassPath#openClassfile(String)

protected ClassPoolTail source;
protected ClassPool parent;
protected Hashtable classes; // should be synchronous

+ 7
- 3
src/main/javassist/ClassPoolTail.java Wyświetl plik

@@ -159,9 +159,13 @@ final class JarClassPath implements ClassPath {
URL jarURL = find(classname);
if (null != jarURL)
try {
java.net.URLConnection con = jarURL.openConnection();
con.setUseCaches(false);
return con.getInputStream();
if (ClassPool.cacheOpenedJarFile)
return jarURL.openConnection().getInputStream();
else {
java.net.URLConnection con = jarURL.openConnection();
con.setUseCaches(false);
return con.getInputStream();
}
}
catch (IOException e) {
throw new NotFoundException("broken jar file?: "

Ładowanie…
Anuluj
Zapisz