From 613a95a2dd3d468e6302c6068eefcff7dce2b28d Mon Sep 17 00:00:00 2001 From: jhugunin Date: Thu, 10 Apr 2003 16:54:44 +0000 Subject: [PATCH] don't keep track of bytes written to disk this saves memory and makes testing incremental compilation more sensitive --- .../org/aspectj/weaver/bcel/UnwovenClassFile.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/UnwovenClassFile.java b/weaver/src/org/aspectj/weaver/bcel/UnwovenClassFile.java index 88c23811c..ab4917ce8 100644 --- a/weaver/src/org/aspectj/weaver/bcel/UnwovenClassFile.java +++ b/weaver/src/org/aspectj/weaver/bcel/UnwovenClassFile.java @@ -28,7 +28,7 @@ public class UnwovenClassFile { protected String filename; protected byte[] bytes; // protected JavaClass javaClass = null; - protected byte[] writtenBytes = null; + //protected byte[] writtenBytes = null; protected List /* ChildClass */ writtenChildClasses = new ArrayList(0); protected String className = null; @@ -75,16 +75,20 @@ public class UnwovenClassFile { public void writeWovenBytes(byte[] bytes, List childClasses) throws IOException { writeChildClasses(childClasses); + //System.err.println("should write: " + getClassName()); + //System.err.println("about to write: " + this + ", " + writtenBytes + ", "); // + writtenBytes != null + " && " + unchanged(bytes, writtenBytes) ); - if (writtenBytes != null && !unchanged(bytes, writtenBytes)) return; + //if (writtenBytes != null && unchanged(bytes, writtenBytes)) return; + + //System.err.println(" actually wrote it"); BufferedOutputStream os = FileUtil.makeOutputStream(new File(filename)); os.write(bytes); os.close(); - writtenBytes = bytes; + //writtenBytes = bytes; } private void writeChildClasses(List childClasses) throws IOException { @@ -141,9 +145,6 @@ public class UnwovenClassFile { if (className == null) className = getJavaClass().getClassName(); return className; } - public byte[] getWrittenBytes() { - return writtenBytes; - } public String toString() { return "UnwovenClassFile(" + filename + ", " + getClassName() + ")"; -- 2.39.5