minor: remove the unnecessary final,static (#11098)

This commit is contained in:
Laglangyue 2024-04-19 06:26:01 +08:00 committed by GitHub
parent add8c37a41
commit 52e65ec0d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ public final class AltsChannelBuilder extends ForwardingChannelBuilder2<AltsChan
new AltsChannelCredentials.Builder(); new AltsChannelCredentials.Builder();
/** "Overrides" the static method in {@link ManagedChannelBuilder}. */ /** "Overrides" the static method in {@link ManagedChannelBuilder}. */
public static final AltsChannelBuilder forTarget(String target) { public static AltsChannelBuilder forTarget(String target) {
return new AltsChannelBuilder(target); return new AltsChannelBuilder(target);
} }

View File

@ -35,7 +35,7 @@ public final class ComputeEngineChannelBuilder
} }
/** "Overrides" the static method in {@link ManagedChannelBuilder}. */ /** "Overrides" the static method in {@link ManagedChannelBuilder}. */
public static final ComputeEngineChannelBuilder forTarget(String target) { public static ComputeEngineChannelBuilder forTarget(String target) {
return new ComputeEngineChannelBuilder(target); return new ComputeEngineChannelBuilder(target);
} }

View File

@ -35,7 +35,7 @@ public final class GoogleDefaultChannelBuilder
} }
/** "Overrides" the static method in {@link ManagedChannelBuilder}. */ /** "Overrides" the static method in {@link ManagedChannelBuilder}. */
public static final GoogleDefaultChannelBuilder forTarget(String target) { public static GoogleDefaultChannelBuilder forTarget(String target) {
return new GoogleDefaultChannelBuilder(target); return new GoogleDefaultChannelBuilder(target);
} }

View File

@ -32,7 +32,7 @@ import org.junit.runners.JUnit4;
@RunWith(JUnit4.class) @RunWith(JUnit4.class)
public class AltsHandshakerStubTest { public class AltsHandshakerStubTest {
/** Mock status of handshaker service. */ /** Mock status of handshaker service. */
private static enum Status { private enum Status {
OK, OK,
ERROR, ERROR,
COMPLETE COMPLETE

View File

@ -146,7 +146,7 @@ public final class TestUtils {
} }
@SuppressWarnings("ReferenceEquality") @SuppressWarnings("ReferenceEquality")
public static final EquivalentAddressGroup stripAttrs(EquivalentAddressGroup eag) { public static EquivalentAddressGroup stripAttrs(EquivalentAddressGroup eag) {
if (eag.getAttributes() == Attributes.EMPTY) { if (eag.getAttributes() == Attributes.EMPTY) {
return eag; return eag;
} }

View File

@ -251,7 +251,7 @@ public class RouteGuideServer {
* Get the notes list for the given location. If missing, create it. * Get the notes list for the given location. If missing, create it.
*/ */
private List<RouteNote> getOrCreateNotes(Point location) { private List<RouteNote> getOrCreateNotes(Point location) {
List<RouteNote> notes = Collections.synchronizedList(new ArrayList<RouteNote>()); List<RouteNote> notes = Collections.synchronizedList(new ArrayList<>());
List<RouteNote> prevNotes = routeNotes.putIfAbsent(location, notes); List<RouteNote> prevNotes = routeNotes.putIfAbsent(location, notes);
return prevNotes != null ? prevNotes : notes; return prevNotes != null ? prevNotes : notes;
} }