diff options
-rw-r--r-- | pom.xml | 13 | ||||
-rw-r--r-- | src/main/javassist/bytecode/annotation/MemberValue.java | 24 |
2 files changed, 25 insertions, 12 deletions
@@ -39,6 +39,19 @@ </archive> </configuration> </plugin> + <plugin> + <artifactId>maven-source-plugin</artifactId> + <version>2.0.3</version> + <executions> + <execution> + <id>attach-sources</id> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + <inherited>true</inherited> + </plugin> </plugins> </build> <profiles> 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; } |