ppalaga commented on a change in pull request #3029: URL: https://github.com/apache/camel-quarkus/pull/3029#discussion_r694760403
########## File path: extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/ConsumeProcessor.java ########## @@ -187,6 +212,28 @@ void generateConsumeRoutes( } } + private String findEndpointMethodName(final String propertyName, ClassInfo declaringClass, List<String> triedMethods) { + /* Here we attempt to mimic what Camel does + * in org.apache.camel.impl.engine.CamelPostProcessorHelper.doGetEndpointInjection(Object, String, String) */ + final String isGetter = "is" + StringHelper.capitalize(propertyName, false); + final String getGetter = "get" + StringHelper.capitalize(propertyName, false); + Optional<MethodInfo> method = Stream.of(isGetter, getGetter, isGetter + "Endpoint", getGetter + "Endpoint") + .peek(triedMethods::add) + .map(declaringClass::method) + .filter(m -> m != null) + .findFirst(); + if (propertyName.startsWith("on")) { Review comment: Good catch, thanks! Let me fix 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. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org