[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #392: Perform TypeConverterLoader discovery using jandex instead of camel's class path scanner

2019-11-11 Thread GitBox
ppalaga commented on a change in pull request #392: Perform TypeConverterLoader 
discovery using jandex instead of camel's class path scanner
URL: https://github.com/apache/camel-quarkus/pull/392#discussion_r344677133
 
 

 ##
 File path: 
extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSupport.java
 ##
 @@ -87,6 +88,14 @@ public static boolean isPublic(ClassInfo ci) {
 .map(ClassInfo::toString);
 }
 
+public static CamelBeanBuildItem createBeanFromType(RecorderContext 
context, String type) {
+return new CamelBeanBuildItem(type, context.classProxy(type), 
context.newInstance(type));
+}
+
+public static CamelBeanBuildItem createBeanFromType(RecorderContext 
context, ClassInfo info) {
+return createBeanFromType(context, info.name().toString());
+}
+
 
 Review comment:
   I do not see any of these methods used anywhere. Are you sure we need them?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #392: Perform TypeConverterLoader discovery using jandex instead of camel's class path scanner

2019-11-11 Thread GitBox
ppalaga commented on a change in pull request #392: Perform TypeConverterLoader 
discovery using jandex instead of camel's class path scanner
URL: https://github.com/apache/camel-quarkus/pull/392#discussion_r344679240
 
 

 ##
 File path: 
extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastTypeConverter.java
 ##
 @@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.core;
+
+import org.apache.camel.impl.converter.DefaultTypeConverter;
+import org.apache.camel.spi.TypeConverterLoader;
+
+public class FastTypeConverter extends DefaultTypeConverter {
+public FastTypeConverter() {
+super(null, null, null, null, false);
+}
+
+@Override
+protected void doStart() throws Exception {
+for (TypeConverterLoader loader : 
getCamelContext().getRegistry().findByType(TypeConverterLoader.class)) {
+log.debug("TypeConverterLoader: {} loading converters", loader);
+loader.load(this);
+}
+}
+
+@Override
+public void loadCoreAndFastTypeConverters() throws Exception {
+throw new IllegalStateException("This method should not be invoked");
 
 Review comment:
   The message is not useful unless it gives a hint why it should not be 
invoked.


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:
us...@infra.apache.org


With regards,
Apache Git Services