summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-07-30 12:59:07 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-07-30 12:59:07 +0000
commitc08c13e3b047dfce466a52fe350f2b895f8c9365 (patch)
tree6fdd03c36d1bae0337d171e76cc5b10f48c6fcae
parent721ab4e11e031a4667623cbdec9c24502a13d905 (diff)
downloadjavassist-c08c13e3b047dfce466a52fe350f2b895f8c9365.tar.gz
javassist-c08c13e3b047dfce466a52fe350f2b895f8c9365.zip
fixed JASSIST-171
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@641 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--javassist.jarbin665248 -> 656152 bytes
-rw-r--r--src/main/javassist/bytecode/SignatureAttribute.java2
-rw-r--r--src/test/javassist/JvstTest4.java12
3 files changed, 13 insertions, 1 deletions
diff --git a/javassist.jar b/javassist.jar
index e8abb197..6d3270f6 100644
--- a/javassist.jar
+++ b/javassist.jar
Binary files differ
diff --git a/src/main/javassist/bytecode/SignatureAttribute.java b/src/main/javassist/bytecode/SignatureAttribute.java
index 4ebb457d..1ab101e6 100644
--- a/src/main/javassist/bytecode/SignatureAttribute.java
+++ b/src/main/javassist/bytecode/SignatureAttribute.java
@@ -1066,7 +1066,7 @@ public class SignatureAttribute extends AttributeInfo {
targs = null;
ClassType thisClass = ClassType.make(sig, start, end, targs, parent);
- if (t == '$') {
+ if (t == '$' || t == '.') {
c.position--;
return parseClassType2(sig, c, thisClass);
}
diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java
index 2a732cf4..f06d79f3 100644
--- a/src/test/javassist/JvstTest4.java
+++ b/src/test/javassist/JvstTest4.java
@@ -762,4 +762,16 @@ public class JvstTest4 extends JvstTestRoot {
java.lang.reflect.Method rm2 = clazz.getDeclaredMethod("set", new Class[] { Object.class });
assertEquals("T", ((java.lang.reflect.TypeVariable)rm2.getGenericParameterTypes()[0]).getName());
}
+
+ public void testJIRA171() throws Exception {
+ SignatureAttribute.MethodSignature ms
+ = SignatureAttribute.toMethodSignature("(Ljava/lang/Object;Lorg/apache/hadoop/io/Text;"
+ + "Lorg/apache/hadoop/mapreduce/Mapper<Ljava/lang/Object;Lorg/apache/hadoop/io/Text;"
+ + "Lorg/apache/hadoop/io/Text;Lorg/apache/hadoop/io/IntWritable;>.Context;)V");
+ String s = ms.toString();
+ System.out.println(s);
+ assertEquals("<> (java.lang.Object, org.apache.hadoop.io.Text, "
+ + "org.apache.hadoop.mapreduce.Mapper<java.lang.Object, org.apache.hadoop.io.Text, "
+ + "org.apache.hadoop.io.Text, org.apache.hadoop.io.IntWritable>.Context) void", s);
+ }
}