[
https://issues.apache.org/jira/browse/CAMEL-9408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15050394#comment-15050394
]
ASF GitHub Bot commented on CAMEL-9408:
---------------------------------------
GitHub user lburgazzoli opened a pull request:
https://github.com/apache/camel/pull/720
[CAMEL-9408] Reduce garbage in ApiName Enums
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/lburgazzoli/apache-camel
TOOLING-API-COMPONENT-GARBAGE
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/720.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #720
----
commit c973f5f97ba286c3fa89c0db77f4aad685e05a02
Author: lburgazzoli <[email protected]>
Date: 2015-12-09T12:54:50Z
Reduce garbage in ApiName Enums
----
> Camel ApiName Enumeration : object creation optimization
> --------------------------------------------------------
>
> Key: CAMEL-9408
> URL: https://issues.apache.org/jira/browse/CAMEL-9408
> Project: Camel
> Issue Type: Improvement
> Components: tooling
> Reporter: Luca Burgazzoli
> Priority: Minor
>
> The code generated by camel-api-component-maven-plugin for ApiName can
> potentially generate excessive garbage if fromValue is invoked often, this is
> because:
> - enum::values() is not cached so it generates a new array for each call
> - new for style generates an iterator each time
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)