- Revision
- 610
- Author
- rfscholte
- Date
- 2009-06-23 15:46:56 -0500 (Tue, 23 Jun 2009)
Log Message
fix for QDOX-167: variable with generic typed method call
Modified Paths
Diff
Modified: trunk/qdox/src/grammar/lexer.flex (609 => 610)
--- trunk/qdox/src/grammar/lexer.flex 2009-06-15 16:23:36 UTC (rev 609) +++ trunk/qdox/src/grammar/lexer.flex 2009-06-23 20:46:56 UTC (rev 610) @@ -411,6 +411,10 @@ newMode=true; } } + "." [ \t\r\n]* / "<" { + codeBody.append('.'); + newMode = true; + } "<" { codeBody.append('<'); if (!bracketMode && newMode && !anonymousMode) {
Modified: trunk/qdox/src/test/com/thoughtworks/qdox/JSR14Test.java (609 => 610)
--- trunk/qdox/src/test/com/thoughtworks/qdox/JSR14Test.java 2009-06-15 16:23:36 UTC (rev 609) +++ trunk/qdox/src/test/com/thoughtworks/qdox/JSR14Test.java 2009-06-23 20:46:56 UTC (rev 610) @@ -363,6 +363,19 @@ assertEquals("java.util.List<T extends java.lang.StringBuffer>", paramType.getResolvedGenericValue()); } + //for QDOX-167 + public void testGenericTypedMethodCall() throws Exception { + String source = "import java.util.*;\n" + + "\n" + + "public class MyClass\n" + + "{\n" + + "\n" + + " private static final Map<String, String> map1 = Collections.<String, String>emptyMap();\n" + + "\n" + + " private static final Map<?, ?> map2 = Collections. <String, String> emptyMap();\n" + + "\n" + + "}"; + builder.addSource(new StringReader(source)); + } - }
To unsubscribe from this list please visit:
