Skip to content

Commit d17a2db

Browse files
committed
Upgrade to Checkstyle 8.28
Trying to upgrade Gradle to 7.6 improved the checkstyle plugin such that it appears to have been running in new occasions. That in turn exposed us to checkstyle/checkstyle#5088. That bug was fixed in 8.28, which also fixed lots of other bugs. So now we have better checking and some existing volations needed fixing. Since the code style fixes generated a lot of noise, this is a pre-fix to reduce the size of a Gradle upgrade. I did not upgrade past 8.28 because at some point some other bugs were introduced, in particular with the Indentation module. I chose the oldest version that had the particular bug impacting me fixed. Upgrading to this old-but-newer version still makes it easier to upgrade to a newer version in the future.
1 parent d07ecbe commit d17a2db

File tree

45 files changed

+108
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+108
-109
lines changed

alts/src/main/java/io/grpc/alts/AltsContextUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/7864")
2727
public final class AltsContextUtil {
2828

29-
private AltsContextUtil(){}
29+
private AltsContextUtil() {}
3030

3131
/**
3232
* Creates a {@link AltsContext} from ALTS context information in the {@link ServerCall}.

alts/src/main/java/io/grpc/alts/internal/AltsTsiHandshaker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public void getBytesToSendToPeer(ByteBuffer bytes) throws GeneralSecurityExcepti
169169
}
170170

171171
/**
172-
* Returns true if and only if the handshake is still in progress
172+
* Returns true if and only if the handshake is still in progress.
173173
*
174174
* @return true, if the handshake is still in progress, false otherwise.
175175
*/

alts/src/main/java/io/grpc/alts/internal/NettyTsiHandshaker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ boolean processBytesFromPeer(ByteBuf data) throws GeneralSecurityException {
9999
}
100100

101101
/**
102-
* Returns true if and only if the handshake is still in progress
102+
* Returns true if and only if the handshake is still in progress.
103103
*
104104
* @return true, if the handshake is still in progress, false otherwise.
105105
*/

alts/src/main/java/io/grpc/alts/internal/TsiHandshaker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public interface TsiHandshaker {
6868
boolean processBytesFromPeer(ByteBuffer bytes) throws GeneralSecurityException;
6969

7070
/**
71-
* Returns true if and only if the handshake is still in progress
71+
* Returns true if and only if the handshake is still in progress.
7272
*
7373
* @return true, if the handshake is still in progress, false otherwise.
7474
*/

api/src/main/java/io/grpc/Metadata.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ public String toString() {
834834
abstract T parseBytes(byte[] serialized);
835835

836836
/**
837-
* @return whether this key will be serialized to bytes lazily.
837+
* Returns whether this key will be serialized to bytes lazily.
838838
*/
839839
boolean serializesToStreams() {
840840
return false;

api/src/main/java/io/grpc/NameResolver.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ void onAddresses(
205205
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
206206
public abstract static class Listener2 implements Listener {
207207
/**
208+
* Handles updates on resolved addresses and attributes.
209+
*
208210
* @deprecated This will be removed in 1.22.0
209211
*/
210212
@Override

api/src/main/java/io/grpc/Status.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,8 @@ private static boolean isEscapingChar(byte b) {
599599
}
600600

601601
/**
602+
* Percent encode bytes to make them ASCII.
603+
*
602604
* @param valueBytes the UTF-8 bytes
603605
* @param ri The reader index, pointed at the first byte that needs escaping.
604606
*/

authz/src/test/java/io/grpc/authz/AuthorizationEnd2EndTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import io.grpc.testing.protobuf.SimpleRequest;
3636
import io.grpc.testing.protobuf.SimpleResponse;
3737
import io.grpc.testing.protobuf.SimpleServiceGrpc;
38-
3938
import java.io.File;
4039
import org.junit.After;
4140
import org.junit.Test;

benchmarks/src/jmh/java/io/grpc/benchmarks/TransportBenchmark.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,20 @@ public void setUp() throws Exception {
8787
ServerBuilder<?> serverBuilder;
8888
ManagedChannelBuilder<?> channelBuilder;
8989
switch (transport) {
90-
case INPROCESS:
91-
{
90+
case INPROCESS: {
9291
String name = "bench" + Math.random();
9392
serverBuilder = InProcessServerBuilder.forName(name);
9493
channelBuilder = InProcessChannelBuilder.forName(name);
9594
break;
9695
}
97-
case NETTY:
98-
{
96+
case NETTY: {
9997
InetSocketAddress address = new InetSocketAddress("localhost", pickUnusedPort());
10098
serverBuilder = NettyServerBuilder.forAddress(address, serverCreds);
10199
channelBuilder = NettyChannelBuilder.forAddress(address)
102100
.negotiationType(NegotiationType.PLAINTEXT);
103101
break;
104102
}
105-
case NETTY_LOCAL:
106-
{
103+
case NETTY_LOCAL: {
107104
String name = "bench" + Math.random();
108105
LocalAddress address = new LocalAddress(name);
109106
EventLoopGroup group = new DefaultEventLoopGroup();
@@ -118,8 +115,7 @@ public void setUp() throws Exception {
118115
groupToShutdown = group;
119116
break;
120117
}
121-
case NETTY_EPOLL:
122-
{
118+
case NETTY_EPOLL: {
123119
InetSocketAddress address = new InetSocketAddress("localhost", pickUnusedPort());
124120

125121
// Reflection used since they are only available on linux.
@@ -143,8 +139,7 @@ public void setUp() throws Exception {
143139
groupToShutdown = group;
144140
break;
145141
}
146-
case OKHTTP:
147-
{
142+
case OKHTTP: {
148143
int port = pickUnusedPort();
149144
InetSocketAddress address = new InetSocketAddress("localhost", port);
150145
serverBuilder = NettyServerBuilder.forAddress(address, serverCreds);

benchmarks/src/test/java/io/grpc/benchmarks/driver/LoadWorkerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.junit.runners.JUnit4;
3737

3838
/**
39-
* Basic tests for {@link io.grpc.benchmarks.driver.LoadWorker}
39+
* Basic tests for {@link io.grpc.benchmarks.driver.LoadWorker}.
4040
*/
4141
@RunWith(JUnit4.class)
4242
public class LoadWorkerTest {

0 commit comments

Comments
 (0)