From: aclement Date: Mon, 2 May 2011 18:41:04 +0000 (+0000) Subject: 328099 X-Git-Tag: V1_6_12M1~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1d1d8ca788aaf2764c0f07c32ea3fc0e3f1a9485;p=aspectj.git 328099 --- diff --git a/tests/bugs1612/pr328099/X.java b/tests/bugs1612/pr328099/X.java new file mode 100644 index 000000000..a4f7a143a --- /dev/null +++ b/tests/bugs1612/pr328099/X.java @@ -0,0 +1 @@ +public class X{} diff --git a/tests/bugs1612/pr328099/aop.xml b/tests/bugs1612/pr328099/aop.xml new file mode 100755 index 000000000..b65c5ef91 --- /dev/null +++ b/tests/bugs1612/pr328099/aop.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/tests/bugs1612/pr328099/cert/key.store b/tests/bugs1612/pr328099/cert/key.store new file mode 100755 index 000000000..41288f682 Binary files /dev/null and b/tests/bugs1612/pr328099/cert/key.store differ diff --git a/tests/bugs1612/pr328099/code.jar b/tests/bugs1612/pr328099/code.jar new file mode 100644 index 000000000..252589620 Binary files /dev/null and b/tests/bugs1612/pr328099/code.jar differ diff --git a/tests/bugs1612/pr328099/pom.xml b/tests/bugs1612/pr328099/pom.xml new file mode 100755 index 000000000..7cfbfaf5f --- /dev/null +++ b/tests/bugs1612/pr328099/pom.xml @@ -0,0 +1,95 @@ + + 4.0.0 + + foo.bar + aspectj-certificate-problem + 1.0-SNAPSHOT + jar + + + UTF-8 + + + + + + maven-compiler-plugin + + 1.6 + true + 1.6 + 1.6 + true + true + + + + maven-assembly-plugin + 2.2 + + + jar-with-dependencies + + + + foo.bar.Foo + + + + + + make-assembly + package + + single + + + + + + org.apache.maven.plugins + maven-jarsigner-plugin + + cert/key.store + foo + foobar + target + + + + org.codehaus.mojo + exec-maven-plugin + 1.1 + + + + exec + + + + + java + + + -javaagent:/Users/aclement/installs/aspectj1611/lib/aspectjweaver.jar + -jar + target/aspectj-certificate-problem-1.0-SNAPSHOT-jar-with-dependencies.jar + + + + + + + + org.aspectj + aspectjrt + 1.6.10 + + + org.aspectj + aspectjweaver + 1.6.10 + + + diff --git a/tests/bugs1612/pr328099/readme b/tests/bugs1612/pr328099/readme new file mode 100644 index 000000000..035feb471 --- /dev/null +++ b/tests/bugs1612/pr328099/readme @@ -0,0 +1,9 @@ +Build the src contents into a jar which will then contain class files and our manifest. Jar typically code.jar + +Then sign the jar with + jarsigner -keystore ../cert/key.store -storepass foobar code.jar foo + +as per: http://introcs.cs.princeton.edu/85application/jar/sign.html + +then you can run it: +java -javaagent:XXX -classpath code.jar foo.bar.Foo diff --git a/tests/bugs1612/pr328099/src/META-INF/aop.xml b/tests/bugs1612/pr328099/src/META-INF/aop.xml new file mode 100755 index 000000000..d08ae4126 --- /dev/null +++ b/tests/bugs1612/pr328099/src/META-INF/aop.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/tests/bugs1612/pr328099/src/foo/bar/BarAspect.java b/tests/bugs1612/pr328099/src/foo/bar/BarAspect.java new file mode 100755 index 000000000..901978daa --- /dev/null +++ b/tests/bugs1612/pr328099/src/foo/bar/BarAspect.java @@ -0,0 +1,23 @@ +package foo.bar; + +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; + +@Aspect +public class BarAspect { + @SuppressWarnings("unused") + @Pointcut("execution(* foo.bar.Foo.bar())") + private void pointcut() { + } + + @Around("pointcut()") + public Object applyAdvice(ProceedingJoinPoint pjp) throws Throwable { + System.out.print("pre..."); + Object retVal = pjp.proceed(); + System.out.println("...post"); + return retVal; + } + +} diff --git a/tests/bugs1612/pr328099/src/foo/bar/Foo.java b/tests/bugs1612/pr328099/src/foo/bar/Foo.java new file mode 100755 index 000000000..2a35392a2 --- /dev/null +++ b/tests/bugs1612/pr328099/src/foo/bar/Foo.java @@ -0,0 +1,18 @@ +package foo.bar; + +/** + * Hello world! + * + */ +public class Foo +{ + public void bar() { + System.out.print(this.getClass().getSimpleName() + ".bar()"); + } + + public static void main( String[] args ) + { + Foo foo = new Foo(); + foo.bar(); + } +} diff --git a/tests/bugs1612/pr328099/src/foo/bar/FooLaunch.java b/tests/bugs1612/pr328099/src/foo/bar/FooLaunch.java new file mode 100644 index 000000000..ed7452f30 --- /dev/null +++ b/tests/bugs1612/pr328099/src/foo/bar/FooLaunch.java @@ -0,0 +1,7 @@ +package foo.bar; + +public class FooLaunch { + public static void main(String[]argv) { + Foo.main(argv); + } +}