File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
stub/src/main/java/io/grpc/stub Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public CallOptions withAuthority(@Nullable String authority) {
9797 * Returns a new {@code CallOptions} with the given call credentials.
9898 */
9999 @ ExperimentalApi ("https//github.com/grpc/grpc-java/issues/1914" )
100- public CallOptions withCredentials (@ Nullable CallCredentials credentials ) {
100+ public CallOptions withCallCredentials (@ Nullable CallCredentials credentials ) {
101101 CallOptions newOptions = new CallOptions (this );
102102 newOptions .credentials = credentials ;
103103 return newOptions ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public class CallOptionsTest {
6868 .withAuthority (sampleAuthority )
6969 .withDeadline (sampleDeadline )
7070 .withAffinity (sampleAffinity )
71- .withCredentials (sampleCreds )
71+ .withCallCredentials (sampleCreds )
7272 .withCompression (sampleCompressor )
7373 .withWaitForReady ()
7474 .withExecutor (directExecutor ())
@@ -120,7 +120,8 @@ public void noStrayModifications() {
120120 .isTrue ();
121121 assertThat (
122122 equal (allSet ,
123- allSet .withCredentials (mock (CallCredentials .class )).withCredentials (sampleCreds )))
123+ allSet .withCallCredentials (mock (CallCredentials .class ))
124+ .withCallCredentials (sampleCreds )))
124125 .isTrue ();
125126 }
126127
@@ -165,7 +166,7 @@ public void toStringMatches_noDeadline_default() {
165166 String actual = allSet
166167 .withDeadline (null )
167168 .withExecutor (new SerializingExecutor (directExecutor ()))
168- .withCredentials (null )
169+ .withCallCredentials (null )
169170 .toString ();
170171
171172 assertThat (actual ).isEqualTo (expected );
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public void setUp() {
120120 mockTransportFactory , mockExecutor );
121121 transport = (ForwardingConnectionClientTransport ) transportFactory .newClientTransport (
122122 address , authority , userAgent );
123- callOptions = CallOptions .DEFAULT .withCredentials (mockCreds );
123+ callOptions = CallOptions .DEFAULT .withCallCredentials (mockCreds );
124124 verify (mockTransportFactory ).newClientTransport (address , authority , userAgent );
125125 assertSame (mockTransport , transport .delegate ());
126126 }
@@ -270,7 +270,7 @@ public void fail_delayed() {
270270
271271 @ Test
272272 public void noCreds () {
273- callOptions = callOptions .withCredentials (null );
273+ callOptions = callOptions .withCallCredentials (null );
274274 ClientStream stream = transport .newStream (method , origHeaders , callOptions );
275275
276276 verify (mockTransport ).newStream (method , origHeaders , callOptions );
Original file line number Diff line number Diff line change @@ -179,6 +179,6 @@ public final S withInterceptors(ClientInterceptor... interceptors) {
179179 */
180180 @ ExperimentalApi ("https//github.com/grpc/grpc-java/issues/1914" )
181181 public final S withCallCredentials (CallCredentials credentials ) {
182- return build (channel , callOptions .withCredentials (credentials ));
182+ return build (channel , callOptions .withCallCredentials (credentials ));
183183 }
184184}
You can’t perform that action at this time.
0 commit comments