summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2010-05-19 15:13:29 +0000
committeraclement <aclement>2010-05-19 15:13:29 +0000
commitcad41dcda5ce81127234513678dedc7833227c92 (patch)
tree2e20b82b539b99bdf937de975c0e9f12ec21c578 /weaver
parent32284aa74065421fcda4d7cbb36b163242a2e528 (diff)
downloadaspectj-cad41dcda5ce81127234513678dedc7833227c92.tar.gz
aspectj-cad41dcda5ce81127234513678dedc7833227c92.zip
312839: smaller class files
Diffstat (limited to 'weaver')
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java6
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java6
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java6
-rw-r--r--weaver/testsrc/org/aspectj/weaver/tools/ReadingAttributes.java2
4 files changed, 12 insertions, 8 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java
index 4f25936b2..2d9af5395 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java
@@ -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);
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java
index f0432ffa3..99083a92e 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java
@@ -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);
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java
index d0b4c2551..e4039d063 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java
@@ -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;
diff --git a/weaver/testsrc/org/aspectj/weaver/tools/ReadingAttributes.java b/weaver/testsrc/org/aspectj/weaver/tools/ReadingAttributes.java
index aff9ba313..180331c93 100644
--- a/weaver/testsrc/org/aspectj/weaver/tools/ReadingAttributes.java
+++ b/weaver/testsrc/org/aspectj/weaver/tools/ReadingAttributes.java
@@ -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);