diff options
author | aclement <aclement> | 2004-11-23 08:53:54 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-11-23 08:53:54 +0000 |
commit | 837c97b0dd4854b8dbc0075c94b6226fa49f1803 (patch) | |
tree | 106d4bcc800945bac38b23c5029e23201321bb87 /org.aspectj.ajdt.core | |
parent | 6d7e965c46e93c74f910d03bc279c25404335418 (diff) | |
download | aspectj-837c97b0dd4854b8dbc0075c94b6226fa49f1803.tar.gz aspectj-837c97b0dd4854b8dbc0075c94b6226fa49f1803.zip |
Some more fixes for Bug 78954: Compiler cannot cope with 4000 jars on the classpath.
- ClassPathManager can now manage its set of open archives, rather than being 'unlimited' it now limits itself to 1000 open archives (which can be increased via a sys prop).
- BcelWorld is changed to add a tidy up method that can tell class path manager to close its archives (useful for the IDE)
- BcelWorld is also changed to ensure 'it' is the repository used to resolve classes, there were previously some situations where BCEL would start loading classes itself (creating duplicates in memory of things like java/lang/String etc). I'm not sure if this will alter our performance/memory characteristics.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseClassPathManager.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseClassPathManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseClassPathManager.java index 8b8bf7bcb..998e68040 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseClassPathManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseClassPathManager.java @@ -97,6 +97,7 @@ public class EclipseClassPathManager extends ClassPathManager { private class ClassFileReaderBackedClassFile extends ClassPathManager.ClassFile { private ClassFileReader source; + private InputStream is; public ClassFileReaderBackedClassFile(ClassFileReader cfr) { source = cfr; @@ -106,8 +107,18 @@ public class EclipseClassPathManager extends ClassPathManager { * @see org.aspectj.weaver.bcel.ClassPathManager.ClassFile#getInputStream() */ public InputStream getInputStream() throws IOException { - return new ByteArrayInputStream(source.getReferenceBytes()); + is = new ByteArrayInputStream(source.getReferenceBytes()); + return is; } + + public void close() { + try { + if (is!=null) is.close(); + } catch (IOException e) { + // Should never happen ! + e.printStackTrace(); + } + } /* (non-Javadoc) * @see org.aspectj.weaver.bcel.ClassPathManager.ClassFile#getPath() |