summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2006-02-14 14:06:36 +0000
committeraclement <aclement>2006-02-14 14:06:36 +0000
commit32fccd359a00bcfcfef4c9ab4a08eb722aee13b7 (patch)
tree7b53ba0dfb77df49ad7ad38e5890fc6250f3625b
parent34d6d63fdc7780258fe57d8e50ce9bc4a424583d (diff)
downloadaspectj-32fccd359a00bcfcfef4c9ab4a08eb722aee13b7.tar.gz
aspectj-32fccd359a00bcfcfef4c9ab4a08eb722aee13b7.zip
Bugette: annotation value of primitive type 'char' wasnt working !
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/SimpleElementValue.java2
-rw-r--r--bcel-builder/testdata/ComplexAnnotatedClass.java2
-rw-r--r--bcel-builder/testdata/testcode.jarbin17736 -> 17737 bytes
-rw-r--r--bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java2
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..985cd3884 100644
--- a/bcel-builder/testdata/testcode.jar
+++ b/bcel-builder/testdata/testcode.jar
Binary files differ
diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java
index 644c3e8da..7a1925dde 100644
--- a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java
+++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/RuntimeVisibleAnnotationAttributeTest.java
@@ -202,7 +202,7 @@ public class RuntimeVisibleAnnotationAttributeTest extends BcelTestCase {
checkValue(ann,"dval","33.4");
checkValue(ann,"sval","99");
checkValue(ann,"bval","2");
- checkValue(ann,"cval","5");
+ checkValue(ann,"cval",new Character('5').toString());
checkValue(ann,"zval","false");
}