Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove logging for duplicate termination in Jersey router (#2316)
Motivation: DefaultJerseyStreamingHttpRouter relies upon the `ContainerResponseWriter` to terminate the request, and therefore the reactive stream subscriber. However it wasn't known if there were control flows that may result in duplicate termination so defensive code was added to guard against this case. During shutdown it is possible for the `ApplicationHandler#handle(..)` method to throw and in this case duplicate termination maybe expected. We currently log an error because this wasn't expected but this raises false alarms and should be removed. ``` java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_0,0,891192830) has been shut down at org.jvnet.hk2.internal.ServiceLocatorImpl.checkState(ServiceLocatorImpl.java:2370) at org.jvnet.hk2.internal.ServiceLocatorImpl.getServiceHandleImpl(ServiceLocatorImpl.java:612) at org.jvnet.hk2.internal.ServiceLocatorImpl.getServiceHandle(ServiceLocatorImpl.java:605) at org.jvnet.hk2.internal.ServiceLocatorImpl.getServiceHandle(ServiceLocatorImpl.java:623) at org.jvnet.hk2.internal.FactoryCreator.getFactoryHandle(FactoryCreator.java:79) at org.jvnet.hk2.internal.FactoryCreator.dispose(FactoryCreator.java:149) at org.jvnet.hk2.internal.SystemDescriptor.dispose(SystemDescriptor.java:518 at org.glassfish.jersey.inject.hk2.RequestContext.lambda$findOrCreate$0(RequestContext.java:60) at org.glassfish.jersey.internal.inject.ForeignDescriptorImpl.dispose(ForeignDescriptorImpl.java:63) at org.glassfish.jersey.inject.hk2.Hk2RequestScope$Instance.remove(Hk2RequestScope.java:126) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.glassfish.jersey.inject.hk2.Hk2RequestScope$Instance.release(Hk2RequestScope.java:143) at org.glassfish.jersey.process.internal.RequestScope.release(RequestScope.java:246) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:267) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) at io.servicetalk.http.router.jersey.DefaultJerseyStreamingHttpRouter.handle0(DefaultJerseyStreamingHttpRouter.java:261) ```
- Loading branch information