diff options
author | aclement <aclement> | 2005-09-14 11:10:52 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-09-14 11:10:52 +0000 |
commit | 87e5c2eccac7cf0027b7711cfe1bd4ead21d21cf (patch) | |
tree | ee1c0f4242a80535e78e5c6ec2147a308ba5776b | |
parent | bddda4072f25bdcd680e5f167a1faed145066f93 (diff) | |
download | aspectj-87e5c2eccac7cf0027b7711cfe1bd4ead21d21cf.tar.gz aspectj-87e5c2eccac7cf0027b7711cfe1bd4ead21d21cf.zip |
test and fix for pr109486: bcel exception when expecting compiler error for final abstract class.
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/classfile/ClassParser.java | 9 | ||||
-rw-r--r-- | lib/bcel/bcel-src.zip | bin | 870784 -> 870790 bytes | |||
-rw-r--r-- | lib/bcel/bcel.jar | bin | 593682 -> 593009 bytes | |||
-rw-r--r-- | tests/bugs150/PR109486.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 6 |
6 files changed, 14 insertions, 4 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/ClassParser.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/ClassParser.java index a8f6f122d..e2508a00d 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/ClassParser.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/ClassParser.java @@ -70,7 +70,7 @@ import java.util.zip.*; * JVM specification 1.0</a>. See this paper for * further details about the structure of a bytecode file. * - * @version $Id: ClassParser.java,v 1.2 2004/11/19 16:45:18 aclement Exp $ + * @version $Id: ClassParser.java,v 1.3 2005/09/14 11:10:57 aclement Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> */ public final class ClassParser { @@ -237,9 +237,10 @@ public final class ClassParser { if((access_flags & Constants.ACC_INTERFACE) != 0) access_flags |= Constants.ACC_ABSTRACT; - if(((access_flags & Constants.ACC_ABSTRACT) != 0) && - ((access_flags & Constants.ACC_FINAL) != 0 )) - throw new ClassFormatException("Class can't be both final and abstract"); + // don't police it like this... leave higher level verification code to check it. +// if(((access_flags & Constants.ACC_ABSTRACT) != 0) && +// ((access_flags & Constants.ACC_FINAL) != 0 )) +// throw new ClassFormatException("Class can't be both final and abstract"); class_name_index = file.readUnsignedShort(); superclass_name_index = file.readUnsignedShort(); diff --git a/lib/bcel/bcel-src.zip b/lib/bcel/bcel-src.zip Binary files differindex e1eedf2dd..8948b94e8 100644 --- a/lib/bcel/bcel-src.zip +++ b/lib/bcel/bcel-src.zip diff --git a/lib/bcel/bcel.jar b/lib/bcel/bcel.jar Binary files differindex af02780a7..dc5d6e48c 100644 --- a/lib/bcel/bcel.jar +++ b/lib/bcel/bcel.jar diff --git a/tests/bugs150/PR109486.java b/tests/bugs150/PR109486.java new file mode 100644 index 000000000..84c9bead9 --- /dev/null +++ b/tests/bugs150/PR109486.java @@ -0,0 +1 @@ +final abstract aspect PR109486 {} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 5ca0b5775..b657a7cfd 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -194,6 +194,8 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testSyntaxErrorNPE_pr103266() {runTest("NPE on syntax error");} + public void testFinalAbstractClass_pr109486() { runTest("Internal compiler error (ClassParser.java:242)");} + public void testIllegalStateExceptionOnNestedParameterizedType_pr106634() { runTest("IllegalStateException unpacking signature of nested parameterized type"); } diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 85257f841..a33a914df 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -523,6 +523,12 @@ </compile> </ajc-test> + <ajc-test dir="bugs150" pr="109486" title="Internal compiler error (ClassParser.java:242)"> + <compile files="PR109486.java" > + <message kind="error" line="1" text="The class PR109486 can be either abstract or final, not both"/> + </compile> + </ajc-test> + <ajc-test dir="bugs150" pr="109124" title="no verify error with set on inner type"> <compile files="VerifyErrorOnSet.aj" options="-1.5" > </compile> |