This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3c51a9735927be9cf89b62502d8df7fc96dc4d4c Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Nov 12 09:58:20 2021 +0100 Polished --- .../java/org/apache/camel/component/bean/MethodInfo.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java index 811292f..410bfb7 100644 --- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java +++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java @@ -394,7 +394,7 @@ public class MethodInfo { old = exchange.getIn(); } - // create a new message container so we do not drag specialized message objects along + // create a new message container, so we do not drag specialized message objects along // but that is only needed if the old message is a specialized message boolean copyNeeded = !(old.getClass().equals(DefaultMessage.class)); @@ -635,15 +635,13 @@ public class MethodInfo { /** * Evaluate using parameter values where the values can be provided in the method name syntax. * <p/> - * This methods returns accordingly: + * This method returns accordingly: * <ul> * <li><tt>null</tt> - if not a parameter value</li> * <li><tt>Void.TYPE</tt> - if an explicit null, forcing Camel to pass in <tt>null</tt> for that given * parameter</li> * <li>a non <tt>null</tt> value - if the parameter was a parameter value, and to be used</li> * </ul> - * - * @since 2.9 */ private Object evaluateParameterValue(Exchange exchange, int index, Object parameterValue, Class<?> parameterType) { Object answer = null; @@ -659,7 +657,7 @@ public class MethodInfo { // as this method is only for evaluating parameter values Boolean isClass = BeanHelper.isAssignableToExpectedType(exchange.getContext().getClassResolver(), exp, parameterType); - // the method will return a non null value if exp is a class + // the method will return a non-null value if exp is a class if (isClass != null) { return null; } @@ -696,9 +694,9 @@ public class MethodInfo { valid = parameterValue instanceof String; if (!valid) { // the parameter value was not already valid, but since the simple language have evaluated the expression - // which may change the parameterValue, so we have to check it again to see if its now valid + // which may change the parameterValue, so we have to check it again to see if it is now valid exp = exchange.getContext().getTypeConverter().tryConvertTo(String.class, parameterValue); - // re validate if the parameter was not valid the first time + // re-validate if the parameter was not valid the first time valid = BeanHelper.isValidParameterValue(exp); } } @@ -710,7 +708,7 @@ public class MethodInfo { parameterValue = StringHelper.removeLeadingAndEndingQuotes((String) parameterValue); } try { - // its a valid parameter value, so convert it to the expected type of the parameter + // it is a valid parameter value, so convert it to the expected type of the parameter answer = exchange.getContext().getTypeConverter().mandatoryConvertTo(parameterType, exchange, parameterValue); if (LOG.isTraceEnabled()) {