]> source.dussan.org Git - javassist.git/commitdiff
fixed JASSIST-171
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Mon, 30 Jul 2012 12:59:07 +0000 (12:59 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Mon, 30 Jul 2012 12:59:07 +0000 (12:59 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@641 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

javassist.jar
src/main/javassist/bytecode/SignatureAttribute.java
src/test/javassist/JvstTest4.java

index e8abb1971439e2508c6f370cdd025bc9067202db..6d3270f62dcbe3d95d30d8367470f0da28ba7a12 100644 (file)
Binary files a/javassist.jar and b/javassist.jar differ
index 4ebb457d0122828eec9592b1915efb59f1b87995..1ab101e66ab373452dc43b15b426c54a42f6fc3f 100644 (file)
@@ -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);
         }
index 2a732cf413329327aa77952a9011184499a62a5a..f06d79f3e50c3b5d08c142d8e82357432ca74ecb 100644 (file)
@@ -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);
+    }
 }