diff options
-rw-r--r-- | javassist.jar | bin | 665248 -> 656152 bytes | |||
-rw-r--r-- | src/main/javassist/bytecode/SignatureAttribute.java | 2 | ||||
-rw-r--r-- | src/test/javassist/JvstTest4.java | 12 |
3 files changed, 13 insertions, 1 deletions
diff --git a/javassist.jar b/javassist.jar Binary files differindex e8abb197..6d3270f6 100644 --- a/javassist.jar +++ b/javassist.jar 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); + } } |