From b09622f37d7c6d10eb3331097e2c09d670db61fa Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Wed, 6 Aug 2014 08:20:07 -0700 Subject: [PATCH] Fix 440983: RuntimeInvisTypeAnnotation unpacking --- .../apache/bcel/classfile/Attribute.java | 3 ++ .../annotation/RuntimeInvisTypeAnnos.java | 3 +- .../annotation/RuntimeVisTypeAnnos.java | 8 --- lib/bcel/bcel-src.zip | Bin 326548 -> 326466 bytes lib/bcel/bcel.jar | Bin 286993 -> 287014 bytes tests/bugs182/440983/Code.java | 26 +++++++++ tests/bugs182/440983/X.java | 3 ++ tests/bugs182/440983/code.jar | Bin 0 -> 1229 bytes .../org/aspectj/systemtest/AllTests18.java | 2 + .../systemtest/ajc182/Ajc182Tests.java | 50 ++++++++++++++++++ .../systemtest/ajc182/AllTestsAspectJ182.java | 27 ++++++++++ .../org/aspectj/systemtest/ajc182/tests.xml | 18 +++++++ 12 files changed, 130 insertions(+), 10 deletions(-) create mode 100644 tests/bugs182/440983/Code.java create mode 100644 tests/bugs182/440983/X.java create mode 100644 tests/bugs182/440983/code.jar create mode 100644 tests/src/org/aspectj/systemtest/ajc182/Ajc182Tests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc182/AllTestsAspectJ182.java create mode 100644 tests/src/org/aspectj/systemtest/ajc182/tests.xml diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/Attribute.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/Attribute.java index 817628295..34ed08f5e 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/Attribute.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/Attribute.java @@ -62,6 +62,7 @@ import java.io.Serializable; import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.classfile.annotation.RuntimeInvisAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeInvisParamAnnos; +import org.aspectj.apache.bcel.classfile.annotation.RuntimeInvisTypeAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisParamAnnos; import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisTypeAnnos; @@ -162,6 +163,8 @@ public abstract class Attribute implements Cloneable, Node, Serializable { return new BootstrapMethods(idx,len,file,cpool); case Constants.ATTR_RUNTIME_VISIBLE_TYPE_ANNOTATIONS: return new RuntimeVisTypeAnnos(idx, len, file, cpool); + case Constants.ATTR_RUNTIME_INVISIBLE_TYPE_ANNOTATIONS: + return new RuntimeInvisTypeAnnos(idx, len, file, cpool); case Constants.ATTR_METHOD_PARAMETERS: return new MethodParameters(idx, len, file, cpool); default: diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisTypeAnnos.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisTypeAnnos.java index a635fdd55..333ccbddd 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisTypeAnnos.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeInvisTypeAnnos.java @@ -27,11 +27,10 @@ public class RuntimeInvisTypeAnnos extends RuntimeTypeAnnos { } public RuntimeInvisTypeAnnos(int nameIdx, int len, ConstantPool cpool) { - super(Constants.ATTR_RUNTIME_INVISIBLE_TYPE_ANNOTATIONS, true, nameIdx, len, cpool); + super(Constants.ATTR_RUNTIME_INVISIBLE_TYPE_ANNOTATIONS, false, nameIdx, len, cpool); } public void accept(ClassVisitor v) { v.visitRuntimeInvisibleTypeAnnotations(this); } - } \ No newline at end of file diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisTypeAnnos.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisTypeAnnos.java index dbb7d7aeb..59b77dabc 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisTypeAnnos.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeVisTypeAnnos.java @@ -15,7 +15,6 @@ import java.io.DataInputStream; import java.io.IOException; import org.aspectj.apache.bcel.Constants; -import org.aspectj.apache.bcel.classfile.Attribute; import org.aspectj.apache.bcel.classfile.ConstantPool; import org.aspectj.apache.bcel.classfile.ClassVisitor; @@ -30,15 +29,8 @@ public class RuntimeVisTypeAnnos extends RuntimeTypeAnnos { super(Constants.ATTR_RUNTIME_VISIBLE_TYPE_ANNOTATIONS, true, nameIdx, len, cpool); } -// public RuntimeVisTypeAnnos(int nameIndex, int len, byte[] rvaData,ConstantPool cpool) { -// super(Constants.ATTR_RUNTIME_VISIBLE_TYPE_ANNOTATIONS,true,nameIndex,len,rvaData,cpool); -// } - public void accept(ClassVisitor v) { v.visitRuntimeVisibleTypeAnnotations(this); } -// public Attribute copy(ConstantPool constant_pool) { -// throw new RuntimeException("Not implemented yet!"); -// } } \ No newline at end of file diff --git a/lib/bcel/bcel-src.zip b/lib/bcel/bcel-src.zip index 7b2259ed01c9ff734ed7bc0896a9217d05b201c4..5996c3ced1ef8bcc213b2f6953d57caa48174e60 100644 GIT binary patch delta 6045 zcmZXY2Rv18{KwtnknP%gWR#tmaEYJQrK}KLiiB+SLs?xCO0q7FUG@msM9U~C<7SWS zmF&ol|GC}&zhAxn=k>bR>+}AO=Xt)*_dNF;@!L#ITTEpqb?KO6$h5C+wL}?Hk&yK8 zLgjRT2+mrUk*|lBns-Q3tPKV{qP=Mb_WnAF{<(>zQLlTiKLx*>_k8Q1xsqHTvn;WOh)0b)2 zci4@{zen3t_&_eRTs+pnma!7oN!j0hOVCm+XYxSGF}z1`Yj0;~#`ykSlNLl*d2MqN zulD(sHj3jc$=GwN+IUe0Yli!l8DY44iE_Nhia&tVc8S8;$}G38GrmU!+EfZzU+2Vx z?(*D;8%M`7eH5ThiJr4SqFTZY(+!f5cGVcLw1X>)|M9m5($ zUaW+q)g|hGCRaU=cSqz6jMS?;Jc9JtEV!8Qt4G;%_Y*~`1kUBX`=>?exz#}EC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Ex}*uxN=bw722G&2H9FD_Dmjb@Xh+yZ~;puu@MsFIr_xXdz&%Tid~1g^N~qFfke zaX2tb99@?^kuQX7F*Y(hz>%mby5RNUa(ljlYrVqBQozrc!M?noE z5YBBN5X}B*Fw|k;B{r14j6Ygt0(7Bb1|v0h(N z@ulcDLdliNtjk!x* zc?In((KYz!4(>2!iNeBrI2c)>>z4cg2dWh+V(1AD>OH78K8m0@B8Sl&`qpR;$6?$S zZH-RJ;#VBTtkLDf_6vv5Ul={Ku|ZWI2hh(IZHq!Jwi&(#Bt}^8g@U!)psF=D{$^ve zMYrT`Xkd$$(~v zW{)NjH^OCid(;YpCOF8Lk~m>zG z!lGR$;=I$kO`k}GLJsKNI_ryTERM*l)&XT~uxDK{!6f#r0|VqT1Kcpj5k)FV$K|DT z66@M?02h%=bc1Y8z?t@Nt>vJXi;}(Qgt7`R#Fh6>zyJ#<#-Xtonb)qTyiyV~^FL>u z8Xs9oa}kD}r6_)oJxZLTvFjg~=Nz z6D^>DH*mv_(7|&)KoB-~14~Sko(2{$)g7($VIMS813c>kqOr@YG=nZJL2l^G1DIi` hFFHNSJow-OU-Vk#^Wreei*8I-Kfp?tE(FjP{tv2$(PRJs diff --git a/tests/bugs182/440983/Code.java b/tests/bugs182/440983/Code.java new file mode 100644 index 000000000..96411a378 --- /dev/null +++ b/tests/bugs182/440983/Code.java @@ -0,0 +1,26 @@ +import java.util.*; +import java.lang.annotation.*; + +@Target(ElementType.TYPE_USE) +@Retention(RetentionPolicy.CLASS) +@interface Anno {} + +public class Code { + public static void xxx(String []argv) { + List<@Anno String> ls = new ArrayList(); + System.out.println(ls); + } + + public static void yyy(String []argv) { + } + + public static void main(String []argv) { + Code c = new Code(); + c.xxx(argv); + System.out.println("works"); + } +} + +//aspect X { +// before(): execution(* main(..)) {} +//} diff --git a/tests/bugs182/440983/X.java b/tests/bugs182/440983/X.java new file mode 100644 index 000000000..822bbfe13 --- /dev/null +++ b/tests/bugs182/440983/X.java @@ -0,0 +1,3 @@ +aspect X { + before(): execution(* xxx(..)) {} +} diff --git a/tests/bugs182/440983/code.jar b/tests/bugs182/440983/code.jar new file mode 100644 index 0000000000000000000000000000000000000000..1ed5f21ab45e60f9a51e62f9b0cae44bf0d0b4e4 GIT binary patch literal 1229 zcmWIWW@Zs#;Nak3u$;i^%76qo8CV#c^HWmwvJ%S@|D9rBC=EF6ci2E+&u{H8TUFZ| zPwC%- z8LX#H2s}6`E2zhl;CeV^Z9>5>j>i^hqLsPQKYsXVI@@V8&MRH;JIO5Ohr0oz+<`}u z-|n5Z;11I|U7o4=^xl~c!+WQG_}}x&%`czDADG>l8BxS2GXLF-rQ88W9c~m|7k)oU zP;z$expV(p&fYR<Vw1fN znjTMDw~MeiIXP`wkhMtZ$mGfEE?lbUePh~dFJ>bUvZSt|PUFa$oh@DR&u-29dA8^O z-G4v16J$^G$(Z<_u{x0%Ta>V1<uM-5{`)rZuif2q-H#qBy z+Pc(L?)x_}_W$~q;4<+~g-u$MT=V`s4_(j|79%Ww5#w%! z=7m0+X0ZC+s9M;5h4)vo<)v@DMef2+Z0F89eQEA*_K1|dimTbSxrR>5JNN0<_4Swi z*FG~6_@_QiBlnr++TRX2_YNo|9gMb(+3EICDDCX7roS;Ui`P1&id{VY#I(b8`H5%Q zcNjqt`|aNL>V?2atzjY*v5t9p`FfCu?c2+BD1fKc|CRsW<5wM7*xh&Uu^pZWY!TaN_UVjvXH2ir$XCJl0sbN3zJ@7 zKl`laX!LgI0dhhIl?JE)rECcBMrZ})1mvIu p*47wGzsor9`Rf|-E<5$plptZX1NnSpRMkmdoq4gjb)>udl3 literal 0 HcmV?d00001 diff --git a/tests/src/org/aspectj/systemtest/AllTests18.java b/tests/src/org/aspectj/systemtest/AllTests18.java index c382ea504..5001f9a37 100644 --- a/tests/src/org/aspectj/systemtest/AllTests18.java +++ b/tests/src/org/aspectj/systemtest/AllTests18.java @@ -15,12 +15,14 @@ import junit.framework.TestSuite; import org.aspectj.systemtest.ajc180.AllTestsAspectJ180; import org.aspectj.systemtest.ajc181.AllTestsAspectJ181; +import org.aspectj.systemtest.ajc182.AllTestsAspectJ182; public class AllTests18 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ System Test Suite - 1.8"); // $JUnit-BEGIN$ + suite.addTest(AllTestsAspectJ182.suite()); suite.addTest(AllTestsAspectJ181.suite()); suite.addTest(AllTestsAspectJ180.suite()); suite.addTest(AllTests17.suite()); diff --git a/tests/src/org/aspectj/systemtest/ajc182/Ajc182Tests.java b/tests/src/org/aspectj/systemtest/ajc182/Ajc182Tests.java new file mode 100644 index 000000000..545def45d --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc182/Ajc182Tests.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2014 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc182; + +import java.io.File; + +import junit.framework.Test; + +import org.aspectj.apache.bcel.classfile.JavaClass; +import org.aspectj.apache.bcel.classfile.Method; +import org.aspectj.apache.bcel.classfile.annotation.RuntimeInvisTypeAnnos; +import org.aspectj.testing.XMLBasedAjcTestCase; + +/** + * @author Andy Clement + */ +public class Ajc182Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public void testInvisTypeAnnos_440983() throws ClassNotFoundException { + runTest("invis type annos"); + JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Code"); + Method m = getMethodStartsWith(jc, "xxx"); + RuntimeInvisTypeAnnos rita = (RuntimeInvisTypeAnnos)getAttributeStartsWith(m.getCode().getAttributes(),"RuntimeInvisibleTypeAnnotations"); + assertEquals("AnnotationGen:[Anno #0 {}]",rita.getTypeAnnotations()[0].getAnnotation().toString()); + } + + public void testInvisTypeAnnos_440983_2() throws ClassNotFoundException { + runTest("invis type annos 2"); + } + + // --- + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc182Tests.class); + } + + @Override + protected File getSpecFile() { + return getClassResource("tests.xml"); + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc182/AllTestsAspectJ182.java b/tests/src/org/aspectj/systemtest/ajc182/AllTestsAspectJ182.java new file mode 100644 index 000000000..4adbdfb76 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc182/AllTestsAspectJ182.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc182; + +import junit.framework.Test; +import junit.framework.TestSuite; +import org.aspectj.systemtest.apt.AptTests; + +public class AllTestsAspectJ182 { + + public static Test suite() { + TestSuite suite = new TestSuite("AspectJ 1.8.2 tests"); + // $JUnit-BEGIN$ + suite.addTest(Ajc182Tests.suite()); + suite.addTest(AptTests.suite()); + // $JUnit-END$ + return suite; + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc182/tests.xml b/tests/src/org/aspectj/systemtest/ajc182/tests.xml new file mode 100644 index 000000000..9b7383810 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc182/tests.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + -- 2.39.5