forked from google/error-prone
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle Joiner.on(...) in AbstractToString.
Not yet handling the Iterable overload; that's a bit more involved given the lack of prior art. PiperOrigin-RevId: 591205788
- Loading branch information
1 parent
da7be27
commit 654d1db
Showing
11 changed files
with
95 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
import static com.google.errorprone.matchers.method.MethodMatchers.instanceMethod; | ||
|
||
import com.google.errorprone.BugPattern; | ||
import com.google.errorprone.ErrorProneFlags; | ||
import com.google.errorprone.VisitorState; | ||
import com.google.errorprone.fixes.Fix; | ||
import com.google.errorprone.fixes.SuggestedFix; | ||
|
@@ -32,6 +33,7 @@ | |
import com.sun.tools.javac.code.Type; | ||
import com.sun.tools.javac.code.Types; | ||
import java.util.Optional; | ||
import javax.inject.Inject; | ||
|
||
/** | ||
* @author [email protected] (Mike Edgar) | ||
|
@@ -47,6 +49,11 @@ public class ArrayToString extends AbstractToString { | |
|
||
private static final TypePredicate IS_ARRAY = TypePredicates.isArray(); | ||
|
||
@Inject | ||
ArrayToString(ErrorProneFlags flags) { | ||
super(flags); | ||
} | ||
|
||
@Override | ||
protected TypePredicate typePredicate() { | ||
return IS_ARRAY; | ||
|
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
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