-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate static #equals matchers.
And fix a javadoc. RELNOTES: N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=207264130
- Loading branch information
1 parent
59a2dd3
commit e74aee3
Showing
5 changed files
with
20 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,12 @@ | |
import com.sun.tools.javac.code.Type; | ||
import java.util.List; | ||
|
||
/** Bug checker to detect usage of {@code Set<T[]>} or {@code Map<T[], E>}. */ | ||
/** | ||
* Warns that users should not have an array as a key to a Set or Map | ||
* | ||
* @author [email protected] (Siyuan Liu) | ||
* @author [email protected] (Eleanor Harris) | ||
*/ | ||
@BugPattern( | ||
name = "ArrayAsKeyOfSetOrMap", | ||
summary = | ||
|
@@ -43,13 +48,6 @@ | |
+ "consider using a List instead. Otherwise, use IdentityHashMap/Set, " | ||
+ "a Map from a library that handles object arrays, or an Iterable/List of pairs.", | ||
severity = WARNING) | ||
|
||
/** | ||
* Warns that users should not have an array as a key to a Set or Map | ||
* | ||
* @author [email protected] (Siyuan Liu) | ||
* @author [email protected] (Eleanor Harris) | ||
*/ | ||
public class ArrayAsKeyOfSetOrMap extends BugChecker | ||
implements MethodInvocationTreeMatcher, NewClassTreeMatcher { | ||
|
||
|
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