-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4841 from adangel:issue-4817-UnusedPrivateMethod
[java] UnusedPrivateMethod - fix false positive with lambdas #4841
- Loading branch information
Showing
10 changed files
with
184 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
.../sourceforge/pmd/lang/java/rule/bestpractices/unusedprivatemethod/cache/CacheBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html | ||
*/ | ||
|
||
package net.sourceforge.pmd.lang.java.rule.bestpractices.unusedprivatemethod.cache; | ||
|
||
public class CacheBuilder<K, V> { | ||
public static CacheBuilder<Object, Object> newBuilder() { | ||
return null; | ||
} | ||
|
||
public <X extends K, Y extends V> LoadingCache<X, Y> build(CacheLoader<? super X, Y> loader) { | ||
return null; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...t/sourceforge/pmd/lang/java/rule/bestpractices/unusedprivatemethod/cache/CacheLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html | ||
*/ | ||
|
||
package net.sourceforge.pmd.lang.java.rule.bestpractices.unusedprivatemethod.cache; | ||
|
||
import java.util.function.Function; | ||
|
||
public class CacheLoader<K, V> { | ||
private CacheLoader() {} | ||
|
||
public static <K, V> CacheLoader<K, V> from(Function<K, V> r) { | ||
return null; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
.../sourceforge/pmd/lang/java/rule/bestpractices/unusedprivatemethod/cache/LoadingCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html | ||
*/ | ||
|
||
package net.sourceforge.pmd.lang.java.rule.bestpractices.unusedprivatemethod.cache; | ||
|
||
public class LoadingCache<K, V> { | ||
public V getUnchecked(K k) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters