diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-07-30 12:59:07 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-07-30 12:59:07 +0000 |
commit | c08c13e3b047dfce466a52fe350f2b895f8c9365 (patch) | |
tree | 6fdd03c36d1bae0337d171e76cc5b10f48c6fcae /src | |
parent | 721ab4e11e031a4667623cbdec9c24502a13d905 (diff) | |
download | javassist-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
Diffstat (limited to 'src')
-rw-r--r-- | src/main/javassist/bytecode/SignatureAttribute.java | 2 | ||||
-rw-r--r-- | src/test/javassist/JvstTest4.java | 12 |
2 files changed, 13 insertions, 1 deletions
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); + } } |