aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2009-01-13 17:38:10 +0000
committeraclement <aclement>2009-01-13 17:38:10 +0000
commit681a4e5c11e4eba217c2a68f33ebc309bcf64a95 (patch)
tree506ea7c7bf5da925e5eff1fb94cf524207d61d2c /asm
parentd9bd46d462bc3742bfcc72d7baf493c49d96cb4b (diff)
downloadaspectj-681a4e5c11e4eba217c2a68f33ebc309bcf64a95.tar.gz
aspectj-681a4e5c11e4eba217c2a68f33ebc309bcf64a95.zip
260384: NumberFormatException
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
index d212926bb..fb825fade 100644
--- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
+++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
@@ -202,8 +202,9 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
if (object.getKind() == ipe.getKind()) {
if (object.getName().endsWith("{..}")) {
String existingHandle = object.getHandleIdentifier();
- int suffixPosition = existingHandle.indexOf('!');
- if (suffixPosition != -1) {
+ int suffixPosition = existingHandle.lastIndexOf('!');
+ int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
+ if (suffixPosition != -1 && lastSquareBracket<suffixPosition) { // pr260384
count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
} else {
if (count == 1) {
@@ -222,8 +223,9 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
if (object.getKind() == ipe.getKind()) {
if (object.getName().equals(ipe.getName())) {
String existingHandle = object.getHandleIdentifier();
- int suffixPosition = existingHandle.indexOf('!');
- if (suffixPosition != -1) {
+ int suffixPosition = existingHandle.lastIndexOf('!');
+ int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
+ if (suffixPosition != -1 && lastSquareBracket<suffixPosition) { // pr260384
count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
} else {
if (count == 1) {