diff options
author | aclement <aclement> | 2005-09-19 15:12:36 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-09-19 15:12:36 +0000 |
commit | eb39196938a01554927e21e8fcf95c25021530c6 (patch) | |
tree | 025a3c55d6d60568fc2b371739ac3e21ec8230a3 /bcel-builder | |
parent | d01e7fced891648a3d4bdff481c041d76763cf86 (diff) | |
download | aspectj-eb39196938a01554927e21e8fcf95c25021530c6.tar.gz aspectj-eb39196938a01554927e21e8fcf95c25021530c6.zip |
allow for references to descriptors when class_info structures refer to arrays. (pr109728)
Diffstat (limited to 'bcel-builder')
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java index 55e1195c9..1883d67c1 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java @@ -62,7 +62,7 @@ import org.aspectj.apache.bcel.classfile.ConstantUtf8; * Super class for InvokeInstruction and FieldInstruction, since they have * some methods in common! * - * @version $Id: FieldOrMethod.java,v 1.3 2004/11/22 08:31:27 aclement Exp $ + * @version $Id: FieldOrMethod.java,v 1.4 2005/09/19 15:12:36 aclement Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> */ public abstract class FieldOrMethod extends CPInstruction implements LoadClass { @@ -103,7 +103,9 @@ public abstract class FieldOrMethod extends CPInstruction implements LoadClass { public String getClassName(ConstantPoolGen cpg) { ConstantPool cp = cpg.getConstantPool(); ConstantCP cmr = (ConstantCP)cp.getConstant(index); - return cp.getConstantString(cmr.getClassIndex(), org.aspectj.apache.bcel.Constants.CONSTANT_Class).replace('/', '.'); + String str = cp.getConstantString(cmr.getClassIndex(), org.aspectj.apache.bcel.Constants.CONSTANT_Class); + if (str.charAt(0)=='[') return str; + else return str.replace('/', '.'); } /** @return type of the referenced class/interface |