Browse Source

tests and fix for pr108062, failing to correctly tokenize (ZZLjava/...)

tags/preDefaultReweavable
acolyer 19 years ago
parent
commit
ad753aa805

+ 4
- 2
bcel-builder/src/org/aspectj/apache/bcel/classfile/GenericSignatureParser.java View File

@@ -384,10 +384,12 @@ public class GenericSignatureParser {
tokens.add(new String("" + chars[index]));
} else {
identifier.append(chars[index]);
}
couldSeePrimitive = false;
}
inArray = false;
break;
case 'L' :
couldSeePrimitive = false;
// deliberate fall-through
default :
identifier.append(chars[index]);
}

BIN
lib/bcel/bcel-src.zip View File


BIN
lib/bcel/bcel.jar View File


+ 38
- 0
tests/bugs150/pr108602.java View File

@@ -0,0 +1,38 @@
/*
* GenericsError.java
*
* Created on September 1, 2005, 9:36 AM
*
*/

import java.util.Collection;

interface GenericsError {
public Collection<String> test(
boolean arg1,
boolean arg2,
Object arg3) ;
}


/*
* GenericsErrorImpl.java
*
* Created on September 1, 2005, 9:37 AM
*
*/

class GenericsErrorImpl implements GenericsError {

public Collection<String> test(
boolean arg1,
boolean arg2,
Object arg3) { return null; }
}

aspect ForceUnpacking {
before() : execution(* *(..)) {}
}

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java View File

@@ -358,6 +358,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("synthetic arguments on itd cons are not used in matching");
}
public void testParsingOfGenericTypeSignature() {
runTest("parse generic type signature with parameterized type in interface");
}
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {

+ 5
- 1
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml View File

@@ -428,7 +428,11 @@
<message line="6" kind="warning" text="should match"/>
</compile>
</ajc-test>
<ajc-test dir="bugs150" pr="108602" title="parse generic type signature with parameterized type in interface">
<compile files="pr108602.java" options="-1.5"/>
</ajc-test>
<!-- ============================================================================ -->
<!-- ============================================================================ -->

Loading…
Cancel
Save