davsclaus commented on code in PR #20113:
URL: https://github.com/apache/camel/pull/20113#discussion_r2580437522
##########
components/camel-rest/src/main/java/org/apache/camel/component/rest/RestProducer.java:
##########
@@ -60,7 +61,7 @@ public class RestProducer extends DefaultAsyncProducer {
private String outType;
// the producer of the Camel component that is used as the HTTP client to
call the REST service
- private AsyncProcessor producer;
+ private AsyncProducer producer;
Review Comment:
AsyncProducer was introduced later, and hence why it was a AsyncProcessor.
Its okay to use the newer API now
##########
components/camel-rest/src/main/java/org/apache/camel/component/rest/RestProducer.java:
##########
@@ -265,6 +266,7 @@ protected void doStart() throws Exception {
protected void doStop() throws Exception {
super.doStop();
ServiceHelper.stopService(producer, binding);
+ producer.close();
Review Comment:
stopService will call doStop which is what close also do. But I guess maybe
the sonartype report dont understand that.
##########
components/camel-rest/src/main/java/org/apache/camel/component/rest/DefaultRestRegistry.java:
##########
@@ -32,15 +32,14 @@
import org.apache.camel.Service;
import org.apache.camel.ServiceStatus;
import org.apache.camel.StatefulService;
-import org.apache.camel.StaticService;
import org.apache.camel.spi.NormalizedEndpointUri;
import org.apache.camel.spi.RestConfiguration;
import org.apache.camel.spi.RestRegistry;
import org.apache.camel.support.LifecycleStrategySupport;
import org.apache.camel.support.service.ServiceSupport;
import org.apache.camel.util.ObjectHelper;
-public class DefaultRestRegistry extends ServiceSupport implements
StaticService, RestRegistry, CamelContextAware {
Review Comment:
This should still be a static service, so this code change is wrong
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]