• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #18733

pending completion
#18733

push

github-actions

web-flow
Upgrade dependencies post v1.57.x branch cut (#10359)

### Dependency updates

#### Update successfully to the latest
- [x] `androidx.core:core 1.10.0 -> 1.10.1`
- [x] `com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0`
- [x] `com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5`
- [x] `com.google.truth:truth 1.0.1 -> 1.1.5`
- [x] `com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1`
- [x] `org.robolectric:robolectric 4.9.2 -> 4.10.3`
- [x] Auto-value
   - [x] `com.google.auto.value:auto-value 1.10.1 -> 1.10.2`
   - [x] `com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2`
- [x] Protobuf
   - [x] `com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protoc 3.22.3 -> 3.23.4`
- [x] Errorprone
   - [x] `com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0`
   - [x] `com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0`
   - ~`libs.checkstylejava8 = com.puppycrawl.tools:checkstyle 9.3 -> 10.12.1`~ -- pinned to last version supporting java8, update not needed

#### Updated to non-latest
- [x] `com.squareup.okio:okio 1.17.5 ->` ~`3.4.0`~ `2.10.0` -- updating to 3.x failed due to them [introducing gradle multiplatform artifacts](https://github.com/square/okio/blob/master/CHANGELOG.md#version-320). Error in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632853307.).
- [x] `org.checkerframework:checker-qual 3.33.0 ->` ~`3.36.0`~ -- removed, no longer needed
- [x] Mockito - updated to `4.11.0`. Versions 5.x break some tests. Errors in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632834435).
   - `org.mockito:mockito-android 3.12.4 ->` ~`5.4.0`~ `4.11.0`
   - `org.mockito:mockito-core 3.12.4 ->` ~`5.4.0`~ `4.11.0`

#### Not updated
- Cronet -- upgrade failed, created a block... (continued)

29160 of 33046 relevant lines covered (88.24%)

0.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.63
/../netty/src/main/java/io/grpc/netty/ClientTransportLifecycleManager.java
1
/*
2
 * Copyright 2016 The gRPC Authors
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package io.grpc.netty;
18

19
import com.google.errorprone.annotations.CanIgnoreReturnValue;
20
import io.grpc.Status;
21
import io.grpc.internal.ManagedClientTransport;
22

23
/** Maintainer of transport lifecycle status. */
24
final class ClientTransportLifecycleManager {
25
  private final ManagedClientTransport.Listener listener;
26
  private boolean transportReady;
27
  private boolean transportShutdown;
28
  private boolean transportInUse;
29
  /** null iff !transportShutdown. */
30
  private Status shutdownStatus;
31
  /** null iff !transportShutdown. */
32
  private Throwable shutdownThrowable;
33
  private boolean transportTerminated;
34

35
  public ClientTransportLifecycleManager(ManagedClientTransport.Listener listener) {
1✔
36
    this.listener = listener;
1✔
37
  }
1✔
38

39
  public void notifyReady() {
40
    if (transportReady || transportShutdown) {
1✔
41
      return;
×
42
    }
43
    transportReady = true;
1✔
44
    listener.transportReady();
1✔
45
  }
1✔
46

47
  /**
48
   * Marks transport as shutdown, but does not set the error status. This must eventually be
49
   * followed by a call to notifyShutdown.
50
   */
51
  public void notifyGracefulShutdown(Status s) {
52
    if (transportShutdown) {
1✔
53
      return;
1✔
54
    }
55
    transportShutdown = true;
1✔
56
    listener.transportShutdown(s);
1✔
57
  }
1✔
58

59
  /** Returns {@code true} if was the first shutdown. */
60
  @CanIgnoreReturnValue
61
  public boolean notifyShutdown(Status s) {
62
    notifyGracefulShutdown(s);
1✔
63
    if (shutdownStatus != null) {
1✔
64
      return false;
1✔
65
    }
66
    shutdownStatus = s;
1✔
67
    shutdownThrowable = s.asException();
1✔
68
    return true;
1✔
69
  }
70

71
  public void notifyInUse(boolean inUse) {
72
    if (inUse == transportInUse) {
1✔
73
      return;
×
74
    }
75
    transportInUse = inUse;
1✔
76
    listener.transportInUse(inUse);
1✔
77
  }
1✔
78

79
  public void notifyTerminated(Status s) {
80
    if (transportTerminated) {
1✔
81
      return;
×
82
    }
83
    transportTerminated = true;
1✔
84
    notifyShutdown(s);
1✔
85
    listener.transportTerminated();
1✔
86
  }
1✔
87

88
  public Status getShutdownStatus() {
89
    return shutdownStatus;
1✔
90
  }
91

92
  public Throwable getShutdownThrowable() {
93
    return shutdownThrowable;
1✔
94
  }
95
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc