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/02/11 11:03:52 UTC
[GitHub] [camel] lburgazzoli opened a new pull request #5074: core: tidy up PropertyBindingSupport::resolveBean
lburgazzoli opened a new pull request #5074:
URL: https://github.com/apache/camel/pull/5074
- remove the name parameter as it was not used
- ensure the value is a string instead of rely to .toString() as it may
produce false results if the .toString() method is crafted to generate
a value starting with #bean:, #class:, #type:
- deprecate the old signature resolveBean(CamelContext, String, Object)
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on a change in pull request #5074: core: tidy up PropertyBindingSupport::resolveBean
Posted by GitBox <gi...@apache.org>.
davsclaus commented on a change in pull request #5074:
URL: https://github.com/apache/camel/pull/5074#discussion_r574420075
##########
File path: core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
##########
@@ -1438,23 +1438,46 @@ private static boolean isParameterMatchingType(Class<?> parameterType, Class<?>
return parameterType.isAssignableFrom(expectedType);
}
+ /**
+ * Resolves the value as either a class, type or bean.
+ *
+ * @param camelContext the camel context
+ * @param name the name of the bean. Never used
+ * @param value how to resolve the bean with a prefix of either #class:, #type: or #bean:
+ * @return the resolve bean
+ * @throws Exception is thrown if error resolving the bean, or if the value is invalid.
+ *
+ * @deprecated use {@link #resolveBean(CamelContext, Object)}
+ */
+ @Deprecated
+ public static Object resolveBean(CamelContext camelContext, String name, Object value) throws Exception {
Review comment:
Just remove the old method as its not used anywhere outside core
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [camel] lburgazzoli merged pull request #5074: core: tidy up PropertyBindingSupport::resolveBean
Posted by GitBox <gi...@apache.org>.
lburgazzoli merged pull request #5074:
URL: https://github.com/apache/camel/pull/5074
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [camel] lburgazzoli commented on a change in pull request #5074: core: tidy up PropertyBindingSupport::resolveBean
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on a change in pull request #5074:
URL: https://github.com/apache/camel/pull/5074#discussion_r574437463
##########
File path: core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
##########
@@ -1438,23 +1438,46 @@ private static boolean isParameterMatchingType(Class<?> parameterType, Class<?>
return parameterType.isAssignableFrom(expectedType);
}
+ /**
+ * Resolves the value as either a class, type or bean.
+ *
+ * @param camelContext the camel context
+ * @param name the name of the bean. Never used
+ * @param value how to resolve the bean with a prefix of either #class:, #type: or #bean:
+ * @return the resolve bean
+ * @throws Exception is thrown if error resolving the bean, or if the value is invalid.
+ *
+ * @deprecated use {@link #resolveBean(CamelContext, Object)}
+ */
+ @Deprecated
+ public static Object resolveBean(CamelContext camelContext, String name, Object value) throws Exception {
Review comment:
done
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [camel] lburgazzoli commented on a change in pull request #5074: core: tidy up PropertyBindingSupport::resolveBean
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on a change in pull request #5074:
URL: https://github.com/apache/camel/pull/5074#discussion_r574422028
##########
File path: core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
##########
@@ -1438,23 +1438,46 @@ private static boolean isParameterMatchingType(Class<?> parameterType, Class<?>
return parameterType.isAssignableFrom(expectedType);
}
+ /**
+ * Resolves the value as either a class, type or bean.
+ *
+ * @param camelContext the camel context
+ * @param name the name of the bean. Never used
+ * @param value how to resolve the bean with a prefix of either #class:, #type: or #bean:
+ * @return the resolve bean
+ * @throws Exception is thrown if error resolving the bean, or if the value is invalid.
+ *
+ * @deprecated use {@link #resolveBean(CamelContext, Object)}
+ */
+ @Deprecated
+ public static Object resolveBean(CamelContext camelContext, String name, Object value) throws Exception {
Review comment:
well, I was using it :)
----------------------------------------------------------------
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:
users@infra.apache.org