Skip to content

Commit

Permalink
Fixes a few additional warnings.
Browse files Browse the repository at this point in the history
Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
  • Loading branch information
spericas committed Jun 18, 2024
1 parent dc5b70f commit 79f8819
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class CollectingObserver<T, V, U, A, R> implements StreamObserver<V> {
private final A accumulator;

/**
* Constructor
* Constructor.
*
* @param collector the collector
* @param observer the observer
Expand All @@ -53,7 +53,7 @@ public CollectingObserver(Collector<T, A, R> collector, StreamObserver<U> observ
}

/**
* Constructor
* Constructor.
*
* @param collector the collector
* @param observer the observer
Expand All @@ -66,7 +66,7 @@ public CollectingObserver(Collector<T, A, R> collector,
}

/**
* Constructor
* Constructor.
*
* @param collector the collector
* @param observer the observer
Expand All @@ -81,7 +81,7 @@ public CollectingObserver(Collector<T, A, R> collector,
}

/**
* Constructor
* Constructor.
*
* @param collector the collector
* @param observer the observer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public <ReqT, ResT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, Res
// set Helidon context into gRPC context
Optional<io.helidon.common.context.Context> helidonContext =
io.helidon.common.context.Contexts.context();
context = Context.current().withValue(ContextKeys.HELIDON_CONTEXT,
context = context.withValue(ContextKeys.HELIDON_CONTEXT,
helidonContext.orElseGet(io.helidon.common.context.Context::create));

// method info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import io.grpc.stub.ServerCalls;

class Grpc<ReqT, ResT> extends GrpcRoute {

private final MethodDescriptor<ReqT, ResT> method;
private final PathMatcher pathMatcher;
private final ServerCallHandler<ReqT, ResT> callHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.helidon.webserver.grpc;

import java.util.Base64;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public SubProtocolResult subProtocol(ConnectionContext ctx,
new GrpcProtocolHandlerNotFound(streamWriter, streamId, currentStreamState));
}
return new SubProtocolResult(true,
new GrpcProtocolHandler(prologue,
new GrpcProtocolHandler<>(prologue,
headers,
streamWriter,
streamId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
* Copyright (c) 2019, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,14 +27,13 @@
*
* @param <T> the type of response expected
*/
class SafeStreamObserver<T>
implements StreamObserver<T> {
class SafeStreamObserver<T> implements StreamObserver<T> {

private static final System.Logger LOGGER = System.getLogger(SafeStreamObserver.class.getName());
/**
* The actual StreamObserver.
*/
private StreamObserver<? super T> delegate;
private final StreamObserver<? super T> delegate;
/**
* Indicates a terminal state.
*/
Expand Down Expand Up @@ -132,8 +131,8 @@ public StreamObserver<? super T> delegate() {
// ----- data members ---------------------------------------------------

/**
* Throws a particular {@code Throwable} only if it belongs to a set of "fatal" error varieties. These varieties are
* as follows:
* Throws a particular {@code Throwable} only if it belongs to a set of "fatal" error varieties.
* These varieties are as follows:
* <ul>
* <li>{@code VirtualMachineError}</li>
* <li>{@code ThreadDeath}</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.helidon.webserver.grpc;

/**
* An enum representing different types of gRPC request
* attribute that can be added to tracing logs.
* An enum representing different types of gRPC request attribute that
* can be added to tracing logs.
*/
public enum ServerRequestAttribute {
/**
Expand Down

0 comments on commit 79f8819

Please sign in to comment.