From 54e8b2adfb7fb72e83de3ab2c78fce93b3ed2a4f Mon Sep 17 00:00:00 2001 From: "kabir.khan@jboss.com" Date: Mon, 29 Mar 2010 14:03:15 +0000 Subject: [PATCH] [JASSIST-111] Uncomment the code containing the fix :-) git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@519 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- pom.xml | 13 ++++++++++ .../bytecode/annotation/MemberValue.java | 24 +++++++++---------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index fa20c84a..7458034e 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,19 @@ + + maven-source-plugin + 2.0.3 + + + attach-sources + + jar + + + + true + diff --git a/src/main/javassist/bytecode/annotation/MemberValue.java b/src/main/javassist/bytecode/annotation/MemberValue.java index 5ce70cb7..3122eda8 100644 --- a/src/main/javassist/bytecode/annotation/MemberValue.java +++ b/src/main/javassist/bytecode/annotation/MemberValue.java @@ -61,18 +61,18 @@ public abstract class MemberValue { private static String convertFromArray(String classname) { -// int index = classname.indexOf("[]"); -// if (index != -1) -// { -// String rawType = classname.substring(0, index); -// StringBuffer sb = new StringBuffer(Descriptor.of(rawType)); -// while (index != -1) -// { -// sb.insert(0, "["); -// index = classname.indexOf("[]", index + 1); -// } -// return sb.toString().replace('/', '.'); -// } + int index = classname.indexOf("[]"); + if (index != -1) + { + String rawType = classname.substring(0, index); + StringBuffer sb = new StringBuffer(Descriptor.of(rawType)); + while (index != -1) + { + sb.insert(0, "["); + index = classname.indexOf("[]", index + 1); + } + return sb.toString().replace('/', '.'); + } return classname; } -- 2.39.5