Skip to content

Commit

Permalink
Sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
dstepanov committed Nov 28, 2023
1 parent 631160b commit 844956b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import java.time.LocalDateTime;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -509,7 +510,7 @@ ExecutionFlow<HttpResponse<?>> createResponseForBody(PropagatedContext propagate
} else if (body instanceof String) {
// Micro-optimization for String values
response = forStatus(routeInfo, null).body(body);
} else if (body instanceof HttpStatus httpStatus) {
} else if (body instanceof HttpStatus httpStatus) {
response = HttpResponse.status(httpStatus);
}
if (response != null) {
Expand All @@ -521,7 +522,7 @@ ExecutionFlow<HttpResponse<?>> createResponseForBody(PropagatedContext propagate
outgoingResponse = ReactiveExecutionFlow.fromPublisher(
ReactivePropagation.propagate(
propagatedContext,
fromReactiveExecute(propagatedContext, request, body, routeInfo)
fromReactiveExecute(propagatedContext, request, Objects.requireNonNull(body), routeInfo)
)
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import io.micronaut.core.annotation.Internal;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.core.execution.ExecutionFlow;
import io.micronaut.core.order.Ordered;

Expand Down Expand Up @@ -96,7 +97,7 @@ default ExecutionFlow<FilterContext> processRequestFilter(@NonNull FilterContext
*/
@NonNull
default ExecutionFlow<FilterContext> processResponseFilter(@NonNull FilterContext context,
@NonNull Throwable exceptionToFilter) {
@Nullable Throwable exceptionToFilter) {
if (!isFiltersResponse()) {
throw new IllegalStateException("Filtering response is not supported!");
}
Expand Down

0 comments on commit 844956b

Please sign in to comment.