]> source.dussan.org Git - aspectj.git/commitdiff
312839: smaller class files
authoraclement <aclement>
Wed, 19 May 2010 15:13:29 +0000 (15:13 +0000)
committeraclement <aclement>
Wed, 19 May 2010 15:13:29 +0000 (15:13 +0000)
weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java
weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java
weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java
weaver/testsrc/org/aspectj/weaver/tools/ReadingAttributes.java

index 4f25936b2a40b53e513e6f75c22245e13963280c..2d9af539504d094917cb8b5b6c4b40bc389996a7 100644 (file)
@@ -22,6 +22,7 @@ import org.aspectj.weaver.CompressingDataOutputStream;
 import org.aspectj.weaver.ResolvedType;
 import org.aspectj.weaver.Shadow;
 import org.aspectj.weaver.VersionedDataInputStream;
+import org.aspectj.weaver.patterns.ConstantPoolSimulator;
 import org.aspectj.weaver.patterns.FormalBinding;
 import org.aspectj.weaver.patterns.Pointcut;
 import org.aspectj.weaver.patterns.SimpleScope;
@@ -106,12 +107,13 @@ public class PatternWeaveTestCase extends WeaveTestCase {
 
        public void checkSerialize(Pointcut p) throws IOException {
                ByteArrayOutputStream bo = new ByteArrayOutputStream();
-               CompressingDataOutputStream out = new CompressingDataOutputStream(bo);
+               ConstantPoolSimulator cps = new ConstantPoolSimulator();
+               CompressingDataOutputStream out = new CompressingDataOutputStream(bo, cps);
                p.write(out);
                out.close();
 
                ByteArrayInputStream bi = new ByteArrayInputStream(bo.toByteArray());
-               VersionedDataInputStream in = new VersionedDataInputStream(bi);
+               VersionedDataInputStream in = new VersionedDataInputStream(bi, cps);
                Pointcut newP = Pointcut.read(in, null);
 
                assertEquals("write/read", p, newP);
index f0432ffa3b8a044c83380ba28c71238a9b0d5f64..99083a92e3e20fd026f9bbbf3438bce4015c52e7 100644 (file)
@@ -27,6 +27,7 @@ import org.aspectj.weaver.ResolvedType;
 import org.aspectj.weaver.ShadowMunger;
 import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.VersionedDataInputStream;
+import org.aspectj.weaver.patterns.ConstantPoolSimulator;
 import org.aspectj.weaver.patterns.Pointcut;
 import org.aspectj.weaver.patterns.SimpleScope;
 
@@ -172,12 +173,13 @@ public class PointcutResidueTestCase extends WeaveTestCase {
 
        public void checkSerialize(Pointcut p) throws IOException {
                ByteArrayOutputStream bo = new ByteArrayOutputStream();
-               CompressingDataOutputStream out = new CompressingDataOutputStream(bo);
+               ConstantPoolSimulator cps = new ConstantPoolSimulator();
+               CompressingDataOutputStream out = new CompressingDataOutputStream(bo, cps);
                p.write(out);
                out.close();
 
                ByteArrayInputStream bi = new ByteArrayInputStream(bo.toByteArray());
-               VersionedDataInputStream in = new VersionedDataInputStream(bi);
+               VersionedDataInputStream in = new VersionedDataInputStream(bi, cps);
                Pointcut newP = Pointcut.read(in, null);
 
                assertEquals("write/read", p, newP);
index d0b4c255182d1495a958c2f6e9d785f505c3d1a4..e4039d063f3b61eb4c4a30e76c2b180b338b0001 100644 (file)
@@ -14,7 +14,6 @@ package org.aspectj.weaver.patterns;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-
 import junit.framework.TestCase;
 
 import org.aspectj.weaver.BoundedReferenceType;
@@ -389,12 +388,13 @@ public class WildTypePatternResolutionTestCase extends TestCase {
        private TypePattern writeAndRead(TypePattern etp) {
                try {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                       CompressingDataOutputStream dos = new CompressingDataOutputStream(baos);
+                       ConstantPoolSimulator cps = new ConstantPoolSimulator();
+                       CompressingDataOutputStream dos = new CompressingDataOutputStream(baos, cps);
                        etp.write(dos);
                        dos.flush();
                        dos.close();
                        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-                       VersionedDataInputStream in = new VersionedDataInputStream(bais);
+                       VersionedDataInputStream in = new VersionedDataInputStream(bais, cps);
                        in.setVersion(new WeaverVersionInfo());
                        TypePattern ret = TypePattern.read(in, null);
                        return ret;
index aff9ba3131d584723026b363e40ee6b1bb87d9a9..180331c93c7763ce56852664f13843fea0dd4eb1 100644 (file)
@@ -36,7 +36,7 @@ public class ReadingAttributes extends TestCase {
                        System.out.println(attrs[i].getName());
                        if (attrs[i].getName().endsWith("WeaverState")) {
                                Unknown u = (Unknown) attrs[i];
-                               VersionedDataInputStream vdis = new VersionedDataInputStream(new ByteArrayInputStream(u.getBytes()));
+                               VersionedDataInputStream vdis = new VersionedDataInputStream(new ByteArrayInputStream(u.getBytes()), null);
                                // WeaverStateInfo wsi =
                                WeaverStateInfo.read(vdis, null);
                                // System.out.println(wsi);