camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lb <>
Subject Camel ApiName Enumeration : object creation optimization
Date Wed, 09 Dec 2015 13:52:50 GMT

I've noticed that 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

So I've create a very simple patch (
that fixes it.

If ok I'll open a JIRA and submit a PR.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message