diff options
author | acolyer <acolyer> | 2005-07-08 15:59:24 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-07-08 15:59:24 +0000 |
commit | ea6af95245d692048e0cc3aa10d6bdbdd931121c (patch) | |
tree | f41bfd8bdb8c7a792907bd800b8cbbd5ad41dd20 | |
parent | 908baa7d7e4e0b879dc7893d0e03e56ff0e659b7 (diff) | |
download | aspectj-ea6af95245d692048e0cc3aa10d6bdbdd931121c.tar.gz aspectj-ea6af95245d692048e0cc3aa10d6bdbdd931121c.zip |
fix in GenericSigParser when tokenising primitives
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/classfile/GenericSignatureParser.java | 22 | ||||
-rw-r--r-- | lib/bcel/bcel-src.zip | bin | 870388 -> 870505 bytes | |||
-rw-r--r-- | lib/bcel/bcel.jar | bin | 593360 -> 593492 bytes |
3 files changed, 22 insertions, 0 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/GenericSignatureParser.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/GenericSignatureParser.java index 230a055c1..4ad1b9a1b 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/GenericSignatureParser.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/GenericSignatureParser.java @@ -301,6 +301,8 @@ public class GenericSignatureParser { int index = 0; List tokens = new ArrayList(); StringBuffer identifier = new StringBuffer(); + boolean inParens = false; + boolean couldSeePrimitive = false; do { switch (chars[index]) { case '<' : @@ -322,11 +324,13 @@ public class GenericSignatureParser { if (identifier.length() > 0) tokens.add(identifier.toString()); identifier = new StringBuffer(); tokens.add("/"); + couldSeePrimitive = false; break; case ';' : if (identifier.length() > 0) tokens.add(identifier.toString()); identifier = new StringBuffer(); tokens.add(";"); + couldSeePrimitive = true; break; case '^': if (identifier.length() > 0) tokens.add(identifier.toString()); @@ -349,13 +353,31 @@ public class GenericSignatureParser { break; case '(' : tokens.add("("); + inParens = true; + couldSeePrimitive = true; break; case ')' : tokens.add(")"); + inParens = false; break; case '[' : tokens.add("["); break; + case 'B' : + case 'C' : + case 'D' : + case 'F' : + case 'I' : + case 'J' : + case 'S' : + case 'V' : + case 'Z' : + if (inParens && couldSeePrimitive && identifier.length() == 0) { + tokens.add(new String("" + chars[index])); + } else { + identifier.append(chars[index]); + } + break; default : identifier.append(chars[index]); } diff --git a/lib/bcel/bcel-src.zip b/lib/bcel/bcel-src.zip Binary files differindex 0b90c2589..25278356c 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 5193c9778..735e2fc80 100644 --- a/lib/bcel/bcel.jar +++ b/lib/bcel/bcel.jar |