[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #225: Rename substitutions class names

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #225: Rename substitutions class names

GitBox
ppalaga commented on a change in pull request #225: Rename substitutions class names
URL: https://github.com/apache/camel-quarkus/pull/225#discussion_r331089810
 
 

 ##########
 File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/graal/SubstituteIntrospectionSupport.java
 ##########
 @@ -21,14 +21,17 @@
 import com.oracle.svm.core.annotate.Alias;
 import com.oracle.svm.core.annotate.RecomputeFieldValue;
 import com.oracle.svm.core.annotate.TargetClass;
+import com.oracle.svm.core.annotate.TargetElement;
 import org.apache.camel.spi.BeanIntrospection;
 import org.apache.camel.support.LRUCacheFactory;
 
+//
+// Don't use class here to avoid warning triggered by IntrospectionSupport deprecation
+//
 @TargetClass(className = "org.apache.camel.support.IntrospectionSupport")
-final class Target_org_apache_camel_support_IntrospectionSupport {
-
+final class SubstituteIntrospectionSupport {
     @Alias
+    @TargetElement(name = "CACHE")
     @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias)
-    private static Map<Class<?>, BeanIntrospection.ClassInfo> CACHE = LRUCacheFactory.newLRUWeakCache(256);
-
+    private static Map<Class<?>, BeanIntrospection.ClassInfo> cache = LRUCacheFactory.newLRUWeakCache(256);
 
 Review comment:
   No, your solution is one line less :-)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services