Skip to content

Commit

Permalink
minor: remove the unnecessary final,static (#11098)
Browse files Browse the repository at this point in the history
  • Loading branch information
laglangyue authored Apr 18, 2024
1 parent add8c37 commit 52e65ec
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class AltsChannelBuilder extends ForwardingChannelBuilder2<AltsChan
new AltsChannelCredentials.Builder();

/** "Overrides" the static method in {@link ManagedChannelBuilder}. */
public static final AltsChannelBuilder forTarget(String target) {
public static AltsChannelBuilder forTarget(String target) {
return new AltsChannelBuilder(target);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private ComputeEngineChannelBuilder(String target) {
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private GoogleDefaultChannelBuilder(String target) {
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@RunWith(JUnit4.class)
public class AltsHandshakerStubTest {
/** Mock status of handshaker service. */
private static enum Status {
private enum Status {
OK,
ERROR,
COMPLETE
Expand Down
2 changes: 1 addition & 1 deletion core/src/testFixtures/java/io/grpc/internal/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public Runnable answer(InvocationOnMock invocation) throws Throwable {
}

@SuppressWarnings("ReferenceEquality")
public static final EquivalentAddressGroup stripAttrs(EquivalentAddressGroup eag) {
public static EquivalentAddressGroup stripAttrs(EquivalentAddressGroup eag) {
if (eag.getAttributes() == Attributes.EMPTY) {
return eag;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void onCompleted() {
* Get the notes list for the given location. If missing, create it.
*/
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);
return prevNotes != null ? prevNotes : notes;
}
Expand Down

0 comments on commit 52e65ec

Please sign in to comment.