gnodet-bot commented on code in PR #28651:
URL: https://github.com/apache/camel/pull/28651#discussion_r4408646952


##########
core/camel-base/src/main/java/org/apache/camel/impl/converter/EnumTypeConverter.java:
##########
@@ -30,6 +30,14 @@
  */
 public class EnumTypeConverter extends TypeConverterSupport implements 
CamelContextAware {
 
+    // getEnumConstants returns a new copy of the constants on every call
+    private static final ClassValue<Enum<?>[]> ENUM_CONSTANTS = new 
ClassValue<>() {
+        @Override
+        protected Enum<?>[] computeValue(Class<?> type) {
+            return (Enum<?>[]) type.getEnumConstants();
+        }

Review Comment:
   Test position comment on unchecked cast



-- 
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]

Reply via email to