aboutsummaryrefslogtreecommitdiffstats
path: root/asm/src
diff options
context:
space:
mode:
authoraclement <aclement>2011-01-06 22:20:58 +0000
committeraclement <aclement>2011-01-06 22:20:58 +0000
commit56056248ac9416df92d62a547d676d80419454b8 (patch)
treeadc88b3420212e7dd865ffb82d1c27b06973f04b /asm/src
parent1c970bb02cfb2f4706e0ad636147d583413690fa (diff)
downloadaspectj-56056248ac9416df92d62a547d676d80419454b8.tar.gz
aspectj-56056248ac9416df92d62a547d676d80419454b8.zip
330170
Diffstat (limited to 'asm/src')
-rw-r--r--asm/src/org/aspectj/asm/AsmManager.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java
index 27f8ef2fa..20579df40 100644
--- a/asm/src/org/aspectj/asm/AsmManager.java
+++ b/asm/src/org/aspectj/asm/AsmManager.java
@@ -640,7 +640,8 @@ public class AsmManager implements IStructureModel {
}
StringBuffer qualifiedTypeNameFromHandle = new StringBuffer();
if (hasPackage != -1) {
- qualifiedTypeNameFromHandle.append(handle.substring(hasPackage + 1, handle.indexOf(HandleProviderDelimiter.CLASSFILE.getDelimiter(), hasPackage)));
+ int classfileLoc = handle.indexOf(HandleProviderDelimiter.CLASSFILE.getDelimiter(), hasPackage);
+ qualifiedTypeNameFromHandle.append(handle.substring(hasPackage + 1, classfileLoc));
qualifiedTypeNameFromHandle.append('.');
}
qualifiedTypeNameFromHandle.append(handle.substring(typeLocation + 1));
@@ -649,7 +650,7 @@ public class AsmManager implements IStructureModel {
return typename;
} catch (StringIndexOutOfBoundsException sioobe) {
// debug for 330170
- System.err.println("Handle processing problem, the handle is: "+handle);
+ System.err.println("Handle processing problem, the handle is: " + handle);
sioobe.printStackTrace(System.err);
return "";
}
@@ -904,7 +905,9 @@ public class AsmManager implements IStructureModel {
* @return true if the handle contains ';' - the char indicating that it is a phantom handle
*/
private boolean isPhantomHandle(String handle) {
- return handle.indexOf(HandleProviderDelimiter.PHANTOM.getDelimiter()) != -1;
+ int phantomMarker = handle.indexOf(HandleProviderDelimiter.PHANTOM.getDelimiter());
+ return phantomMarker != -1
+ && handle.charAt(phantomMarker - 1) == HandleProviderDelimiter.PACKAGEFRAGMENTROOT.getDelimiter();
}
/**