diff options
-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 |