You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/11/04 09:19:04 UTC

[GitHub] [camel] PascalSchumacher commented on a change in pull request #5787: Fixes based on the run of the static analysis tool Findbugs

PascalSchumacher commented on a change in pull request #5787:
URL: https://github.com/apache/camel/pull/5787#discussion_r742654582



##########
File path: core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/StaxConverter.java
##########
@@ -316,7 +319,10 @@ private XMLOutputFactory getXMLOutputFactory() {
 
     private void returnXMLOutputFactory(XMLOutputFactory factory) {
         if (factory != outputFactory) {
-            OUTPUT_FACTORY_POOL.offer(factory);
+            boolean resultOfOffer = OUTPUT_FACTORY_POOL.offer(factory);
+            if (!resultOfOffer) {
+                LOG.error("factory wasn't added into OUTPUT_FACTORY_POOL");

Review comment:
       After updating to Camel `3.12.0` we started to see these errors in our logs (not sure if it is this change or the one above, maybe both).
   
   Are you sure this is an error? I believe it happens when multiple threads concurrently create more factories that the maximum pool capacity. Or am I missing something?




-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Re: [GitHub] [camel] PascalSchumacher commented on a change in pull request #5787: Fixes based on the run of the static analysis tool Findbugs

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah lets revert this part it was a bad change. You are welcome to send a PR

On Thu, Nov 4, 2021 at 10:19 AM GitBox <gi...@apache.org> wrote:
>
>
> PascalSchumacher commented on a change in pull request #5787:
> URL: https://github.com/apache/camel/pull/5787#discussion_r742654582
>
>
>
> ##########
> File path: core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/StaxConverter.java
> ##########
> @@ -316,7 +319,10 @@ private XMLOutputFactory getXMLOutputFactory() {
>
>      private void returnXMLOutputFactory(XMLOutputFactory factory) {
>          if (factory != outputFactory) {
> -            OUTPUT_FACTORY_POOL.offer(factory);
> +            boolean resultOfOffer = OUTPUT_FACTORY_POOL.offer(factory);
> +            if (!resultOfOffer) {
> +                LOG.error("factory wasn't added into OUTPUT_FACTORY_POOL");
>
> Review comment:
>        After updating to Camel `3.12.0` we started to see these errors in our logs (not sure if it is this change or the one above, maybe both).
>
>    Are you sure this is an error? I believe it happens when multiple threads concurrently create more factories that the maximum pool capacity. Or am I missing something?
>
>
>
>
> --
> 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: commits-unsubscribe@camel.apache.org
>
> For queries about this service, please contact Infrastructure at:
> users@infra.apache.org
>
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2