Skip to content

Commit 371a57b

Browse files
committed
Merge branch 'master' into replace-expected-exception
2 parents 6a4c3a6 + 46485c8 commit 371a57b

File tree

209 files changed

+3722
-1456
lines changed

Some content is hidden

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

209 files changed

+3722
-1456
lines changed

BUILD.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ java_library(
3333
"//api",
3434
"//protobuf",
3535
"//stub",
36-
"//stub:javax_annotation",
3736
"@com_google_protobuf//:protobuf_java",
3837
artifact("com.google.code.findbugs:jsr305"),
3938
artifact("com.google.guava:guava"),
@@ -47,7 +46,6 @@ java_library(
4746
"//api",
4847
"//protobuf-lite",
4948
"//stub",
50-
"//stub:javax_annotation",
5149
artifact("com.google.code.findbugs:jsr305"),
5250
artifact("com.google.guava:guava"),
5351
],
@@ -67,6 +65,5 @@ java_library(
6765
visibility = ["//:__subpackages__"],
6866
exports = [
6967
artifact("com.google.auto.value:auto-value-annotations"),
70-
artifact("org.apache.tomcat:annotations-api"), # @Generated for Java 9+
7168
],
7269
)

COMPILING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ This section is only necessary if you are making changes to the code
4444
generation. Most users only need to use `skipCodegen=true` as discussed above.
4545

4646
### Build Protobuf
47-
The codegen plugin is C++ code and requires protobuf 21.7 or later.
47+
The codegen plugin is C++ code and requires protobuf 22.5 or later.
4848

4949
For Linux, Mac and MinGW:
5050
```
51-
$ PROTOBUF_VERSION=21.7
51+
$ PROTOBUF_VERSION=22.5
5252
$ curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-all-$PROTOBUF_VERSION.tar.gz
5353
$ tar xzf protobuf-all-$PROTOBUF_VERSION.tar.gz
5454
$ cd protobuf-$PROTOBUF_VERSION

MODULE.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module(
22
name = "grpc-java",
33
compatibility_level = 0,
44
repo_name = "io_grpc_grpc_java",
5-
version = "1.72.0-SNAPSHOT", # CURRENT_GRPC_VERSION
5+
version = "1.74.0-SNAPSHOT", # CURRENT_GRPC_VERSION
66
)
77

88
# GRPC_DEPS_START
@@ -41,7 +41,6 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
4141
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
4242
"io.perfmark:perfmark-api:0.27.0",
4343
"junit:junit:4.13.2",
44-
"org.apache.tomcat:annotations-api:6.0.53",
4544
"org.checkerframework:checker-qual:3.12.0",
4645
"org.codehaus.mojo:animal-sniffer-annotations:1.24",
4746
]

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
4444
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
4545
basics](https://grpc.io/docs/languages/java/basics).
4646

47-
The [examples](https://github.com/grpc/grpc-java/tree/v1.71.0/examples) and the
48-
[Android example](https://github.com/grpc/grpc-java/tree/v1.71.0/examples/android)
47+
The [examples](https://github.com/grpc/grpc-java/tree/v1.72.0/examples) and the
48+
[Android example](https://github.com/grpc/grpc-java/tree/v1.72.0/examples/android)
4949
are standalone projects that showcase the usage of gRPC.
5050

5151
Download
@@ -56,18 +56,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
5656
<dependency>
5757
<groupId>io.grpc</groupId>
5858
<artifactId>grpc-netty-shaded</artifactId>
59-
<version>1.71.0</version>
59+
<version>1.72.0</version>
6060
<scope>runtime</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>io.grpc</groupId>
6464
<artifactId>grpc-protobuf</artifactId>
65-
<version>1.71.0</version>
65+
<version>1.72.0</version>
6666
</dependency>
6767
<dependency>
6868
<groupId>io.grpc</groupId>
6969
<artifactId>grpc-stub</artifactId>
70-
<version>1.71.0</version>
70+
<version>1.72.0</version>
7171
</dependency>
7272
<dependency> <!-- necessary for Java 9+ -->
7373
<groupId>org.apache.tomcat</groupId>
@@ -79,18 +79,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
7979

8080
Or for Gradle with non-Android, add to your dependencies:
8181
```gradle
82-
runtimeOnly 'io.grpc:grpc-netty-shaded:1.71.0'
83-
implementation 'io.grpc:grpc-protobuf:1.71.0'
84-
implementation 'io.grpc:grpc-stub:1.71.0'
82+
runtimeOnly 'io.grpc:grpc-netty-shaded:1.72.0'
83+
implementation 'io.grpc:grpc-protobuf:1.72.0'
84+
implementation 'io.grpc:grpc-stub:1.72.0'
8585
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
8686
```
8787

8888
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
8989
`grpc-protobuf-lite` instead of `grpc-protobuf`:
9090
```gradle
91-
implementation 'io.grpc:grpc-okhttp:1.71.0'
92-
implementation 'io.grpc:grpc-protobuf-lite:1.71.0'
93-
implementation 'io.grpc:grpc-stub:1.71.0'
91+
implementation 'io.grpc:grpc-okhttp:1.72.0'
92+
implementation 'io.grpc:grpc-protobuf-lite:1.72.0'
93+
implementation 'io.grpc:grpc-stub:1.72.0'
9494
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
9595
```
9696

@@ -99,7 +99,7 @@ For [Bazel](https://bazel.build), you can either
9999
(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).
100100

101101
[the JARs]:
102-
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.71.0
102+
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.72.0
103103

104104
Development snapshots are available in [Sonatypes's snapshot
105105
repository](https://oss.sonatype.org/content/repositories/snapshots/).
@@ -131,7 +131,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
131131
<configuration>
132132
<protocArtifact>com.google.protobuf:protoc:3.25.5:exe:${os.detected.classifier}</protocArtifact>
133133
<pluginId>grpc-java</pluginId>
134-
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.71.0:exe:${os.detected.classifier}</pluginArtifact>
134+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.72.0:exe:${os.detected.classifier}</pluginArtifact>
135135
</configuration>
136136
<executions>
137137
<execution>
@@ -152,7 +152,7 @@ For non-Android protobuf-based codegen integrated with the Gradle build system,
152152
you can use [protobuf-gradle-plugin][]:
153153
```gradle
154154
plugins {
155-
id 'com.google.protobuf' version '0.9.4'
155+
id 'com.google.protobuf' version '0.9.5'
156156
}
157157
158158
protobuf {
@@ -161,7 +161,7 @@ protobuf {
161161
}
162162
plugins {
163163
grpc {
164-
artifact = 'io.grpc:protoc-gen-grpc-java:1.71.0'
164+
artifact = 'io.grpc:protoc-gen-grpc-java:1.72.0'
165165
}
166166
}
167167
generateProtoTasks {
@@ -185,7 +185,7 @@ use protobuf-gradle-plugin but specify the 'lite' options:
185185

186186
```gradle
187187
plugins {
188-
id 'com.google.protobuf' version '0.9.4'
188+
id 'com.google.protobuf' version '0.9.5'
189189
}
190190
191191
protobuf {
@@ -194,7 +194,7 @@ protobuf {
194194
}
195195
plugins {
196196
grpc {
197-
artifact = 'io.grpc:protoc-gen-grpc-java:1.71.0'
197+
artifact = 'io.grpc:protoc-gen-grpc-java:1.72.0'
198198
}
199199
}
200200
generateProtoTasks {

alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
/**
66
*/
7-
@javax.annotation.Generated(
8-
value = "by gRPC proto compiler",
9-
comments = "Source: grpc/gcp/handshaker.proto")
107
@io.grpc.stub.annotations.GrpcGenerated
118
public final class HandshakerServiceGrpc {
129

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import io.grpc.ClientCall;
2222
import io.grpc.ManagedChannel;
2323
import io.grpc.MethodDescriptor;
24+
import io.grpc.internal.GrpcUtil;
2425
import io.grpc.internal.SharedResourceHolder.Resource;
2526
import io.grpc.netty.NettyChannelBuilder;
2627
import io.netty.channel.EventLoopGroup;
@@ -45,6 +46,9 @@ static Resource<Channel> getHandshakerChannelForTesting(String handshakerAddress
4546
return new ChannelResource(handshakerAddress);
4647
}
4748

49+
private static final boolean EXPERIMENTAL_ALTS_HANDSHAKER_KEEPALIVE_PARAMS =
50+
GrpcUtil.getFlag("GRPC_EXPERIMENTAL_ALTS_HANDSHAKER_KEEPALIVE_PARAMS", false);
51+
4852
private static class ChannelResource implements Resource<Channel> {
4953
private final String target;
5054

@@ -57,12 +61,16 @@ public Channel create() {
5761
/* Use its own event loop thread pool to avoid blocking. */
5862
EventLoopGroup eventGroup =
5963
new NioEventLoopGroup(1, new DefaultThreadFactory("handshaker pool", true));
60-
ManagedChannel channel = NettyChannelBuilder.forTarget(target)
64+
NettyChannelBuilder channelBuilder =
65+
NettyChannelBuilder.forTarget(target)
6166
.channelType(NioSocketChannel.class, InetSocketAddress.class)
6267
.directExecutor()
6368
.eventLoopGroup(eventGroup)
64-
.usePlaintext()
65-
.build();
69+
.usePlaintext();
70+
if (EXPERIMENTAL_ALTS_HANDSHAKER_KEEPALIVE_PARAMS) {
71+
channelBuilder.keepAliveTime(10, TimeUnit.MINUTES).keepAliveTimeout(10, TimeUnit.SECONDS);
72+
}
73+
ManagedChannel channel = channelBuilder.build();
6674
return new EventLoopHoldingChannel(channel, eventGroup);
6775
}
6876

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
* A service used to obtain stats for verifying LB behavior.
88
* </pre>
99
*/
10-
@javax.annotation.Generated(
11-
value = "by gRPC proto compiler",
12-
comments = "Source: grpc/testing/test.proto")
1310
@io.grpc.stub.annotations.GrpcGenerated
1411
public final class LoadBalancerStatsServiceGrpc {
1512

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
/**
66
*/
7-
@javax.annotation.Generated(
8-
value = "by gRPC proto compiler",
9-
comments = "Source: grpc/testing/metrics.proto")
107
@io.grpc.stub.annotations.GrpcGenerated
118
public final class MetricsServiceGrpc {
129

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
* A service used to control reconnect server.
88
* </pre>
99
*/
10-
@javax.annotation.Generated(
11-
value = "by gRPC proto compiler",
12-
comments = "Source: grpc/testing/test.proto")
1310
@io.grpc.stub.annotations.GrpcGenerated
1411
public final class ReconnectServiceGrpc {
1512

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/TestServiceGrpc.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
* performance with various types of payload.
99
* </pre>
1010
*/
11-
@javax.annotation.Generated(
12-
value = "by gRPC proto compiler",
13-
comments = "Source: grpc/testing/test.proto")
1411
@io.grpc.stub.annotations.GrpcGenerated
1512
public final class TestServiceGrpc {
1613

0 commit comments

Comments
 (0)