From 32fccd359a00bcfcfef4c9ab4a08eb722aee13b7 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 14 Feb 2006 14:06:36 +0000 Subject: [PATCH] Bugette: annotation value of primitive type 'char' wasnt working ! --- .../annotation/SimpleElementValue.java | 2 +- .../testdata/ComplexAnnotatedClass.java | 2 +- bcel-builder/testdata/testcode.jar | Bin 17736 -> 17737 bytes ...RuntimeVisibleAnnotationAttributeTest.java | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/SimpleElementValue.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/SimpleElementValue.java index 71eed6a1b..7f1affe33 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/SimpleElementValue.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/SimpleElementValue.java @@ -133,7 +133,7 @@ public class SimpleElementValue extends ElementValue { return Integer.toString(b.getBytes()); case PRIMITIVE_CHAR: ConstantInteger ch = (ConstantInteger)cpool.getConstant(idx,Constants.CONSTANT_Integer); - return Integer.toString(ch.getBytes()); + return new Character((char)ch.getBytes()).toString(); case PRIMITIVE_BOOLEAN: ConstantInteger bo = (ConstantInteger)cpool.getConstant(idx,Constants.CONSTANT_Integer); if (bo.getBytes() == 0) return "false"; diff --git a/bcel-builder/testdata/ComplexAnnotatedClass.java b/bcel-builder/testdata/ComplexAnnotatedClass.java index 155e531d0..1e6214a4a 100644 --- a/bcel-builder/testdata/ComplexAnnotatedClass.java +++ b/bcel-builder/testdata/ComplexAnnotatedClass.java @@ -1,3 +1,3 @@ -@ComplexAnnotation(ival=4,bval=2,cval=5,fval=3.0f,dval=33.4,zval=false,jval=56,sval=99) +@ComplexAnnotation(ival=4,bval=2,cval='5',fval=3.0f,dval=33.4,zval=false,jval=56,sval=99) public class ComplexAnnotatedClass { } diff --git a/bcel-builder/testdata/testcode.jar b/bcel-builder/testdata/testcode.jar index 6bac0c9fb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