Merge branch 'issue-207' into pmd/5.5.x
Closes #209 (rebased onto pmd/5.4.x)
This commit is contained in:
@ -1,4 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
|
* Allow method references to specify generics.
|
||||||
|
* Bug #207
|
||||||
|
*
|
||||||
|
* Juan Martin Sotuyo Dodero 01/2017
|
||||||
|
*====================================================================
|
||||||
* Simplify VariableDeclaratorId, forbidding illegal sequences such as
|
* Simplify VariableDeclaratorId, forbidding illegal sequences such as
|
||||||
* this[] and MyClass.this[]
|
* this[] and MyClass.this[]
|
||||||
*
|
*
|
||||||
@ -1814,7 +1819,7 @@ Token t;
|
|||||||
void MethodReference() :
|
void MethodReference() :
|
||||||
{Token t; checkForBadMethodReferenceUsage();}
|
{Token t; checkForBadMethodReferenceUsage();}
|
||||||
{
|
{
|
||||||
"::" ("new" {jjtThis.setImage("new");} | t=<IDENTIFIER> {jjtThis.setImage(t.image);} )
|
"::" ("new" {jjtThis.setImage("new");} | [TypeArguments()] t=<IDENTIFIER> {jjtThis.setImage(t.image);} )
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrimaryPrefix() :
|
void PrimaryPrefix() :
|
||||||
|
@ -136,6 +136,12 @@ public class ParserCornersTest extends ParserTst {
|
|||||||
String c = IOUtils.toString(this.getClass().getResourceAsStream("Bug1530.java"));
|
String c = IOUtils.toString(this.getClass().getResourceAsStream("Bug1530.java"));
|
||||||
parseJava18(c);
|
parseJava18(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGitHubBug207() throws Exception {
|
||||||
|
String c = IOUtils.toString(this.getClass().getResourceAsStream("GitHubBug207.java"));
|
||||||
|
parseJava18(c);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This triggered bug #1484 UnusedLocalVariable - false positive - parenthesis
|
* This triggered bug #1484 UnusedLocalVariable - false positive - parenthesis
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
public class GitHubBug207 {
|
||||||
|
private static HttpMessageWriter<Resource> resourceHttpMessageWriter(BodyInserter.Context context) {
|
||||||
|
return context.map(BodyInserters::<Resource>cast);
|
||||||
|
}
|
||||||
|
}
|
@ -192,6 +192,7 @@ See also [bugfix #1556](https://sourceforge.net/p/pmd/bugs/1556/).
|
|||||||
* [#183](https://github.com/pmd/pmd/issues/183): \[apex] NCSS Method length is incorrect when using method chaining
|
* [#183](https://github.com/pmd/pmd/issues/183): \[apex] NCSS Method length is incorrect when using method chaining
|
||||||
* java
|
* java
|
||||||
* [#185](https://github.com/pmd/pmd/issues/185): \[java] CPD runs into NPE when analyzing Lucene
|
* [#185](https://github.com/pmd/pmd/issues/185): \[java] CPD runs into NPE when analyzing Lucene
|
||||||
|
* [#207](https://github.com/pmd/pmd/issues/207): \[java] Parse error on method reference with generics
|
||||||
* [#213](https://github.com/pmd/pmd/issues/213): \[java] CPD: OutOfMemory when analyzing Lucene
|
* [#213](https://github.com/pmd/pmd/issues/213): \[java] CPD: OutOfMemory when analyzing Lucene
|
||||||
* [#1542](https://sourceforge.net/p/pmd/bugs/1542/): \[java] CPD throws an NPE when parsing enums with -ignore-identifiers
|
* [#1542](https://sourceforge.net/p/pmd/bugs/1542/): \[java] CPD throws an NPE when parsing enums with -ignore-identifiers
|
||||||
* [#1545](https://sourceforge.net/p/pmd/bugs/1545/): \[java] Symbol Table fails to resolve inner classes
|
* [#1545](https://sourceforge.net/p/pmd/bugs/1545/): \[java] Symbol Table fails to resolve inner classes
|
||||||
|
Reference in New Issue
Block a user