This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Description In #1010 we added fixes from Google Error Prone. We have a lot more internal linter fixes!
Here's a run-down of things in this repo we can automatically fix. I'll send a PR.
Remove a few unused imports
Remove or narrow declared and caught checked exceptions across the board to match what's actually possible.
Remove unnecessary use of Guava Functions and lambdas where direct method references will do.
Remove unnecessary use of on-the-fly class declarations where very short lambdas will do
Make all member variables final that we safely can.
Stylistically, reference inner classes (especially enums and Builders) wrt their outer class.
Fix javadocs which include unescaped < and >.
A few Javadoc fixes to make code links explicit
Fix botched attempt to write @code in Logging.java
Simplify some switch/cases (joining redundant cases and removing unnecessary default cases)
Switch to Immutable collections wherever it's clearly possible.
Add @Override in places where relevant
Add buildOrThrow where possible on protos
Replace assertTrue with more specific things (assertEquals, assertSame, assertThat(X).isLessThan(Y), etc)
Remove unnecessary declaration of variables which are only returned
Remove unnecessary generic type specification on right-hand side of assignments.
Switch from LinkedList to ArrayDeque since the latter is essentially always more efficient and we're only using it as a deque.
Switching string splitting to com.google.common.base.Splitter which is more efficient.
Switch from String.toLowerCase to Ascii.toLowerCase for consistency in the face of different system locales
Switch from String.equals("") to String.empty() in a few places
Use Collections.addAll(X, Y) instead of X.addAll(Arrays.asList(Y)) converting an array to a list.
Remove unnecessary class qualification in a few places
Make the Instrumentation class final and uninstantiatable since it only has static members.
Stop checking for null on non-nullable protobuf members.
Remove one mysterious unnecessary String.valueOf to make an identical string from a string.
Replace one == on a String with .equals
Misc other small things
Reactions are currently unavailable
In #1010 we added fixes from Google Error Prone. We have a lot more internal linter fixes!
Here's a run-down of things in this repo we can automatically fix. I'll send a PR.
Functions and lambdas where direct method references will do.<and>.@codeinLogging.java@Overridein places where relevantbuildOrThrowwhere possible on protosassertTruewith more specific things (assertEquals,assertSame,assertThat(X).isLessThan(Y), etc)com.google.common.base.Splitterwhich is more efficient.String.toLowerCasetoAscii.toLowerCasefor consistency in the face of different system localesString.equals("")toString.empty()in a few placesCollections.addAll(X, Y)instead ofX.addAll(Arrays.asList(Y))converting an array to a list.String.valueOfto make an identical string from a string.==on aStringwith.equals