]> source.dussan.org Git - aspectj.git/commitdiff
don't keep track of bytes written to disk
authorjhugunin <jhugunin>
Thu, 10 Apr 2003 16:54:44 +0000 (16:54 +0000)
committerjhugunin <jhugunin>
Thu, 10 Apr 2003 16:54:44 +0000 (16:54 +0000)
this saves memory and makes testing incremental compilation more sensitive

weaver/src/org/aspectj/weaver/bcel/UnwovenClassFile.java

index 88c23811cb16a1ec9b05d16678a41441ab058423..ab4917ce8c20d43d14008e1542efbc30c0c34a61 100644 (file)
@@ -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() + ")";