You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2023/02/10 17:15:45 UTC

[camel-quarkus] branch main updated (d405d08836 -> 4302043554)

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


    from d405d08836 camel-quarkus-integration-test-aws2 fail to compile to native with Camel 4
     new e4b23d9c9a Revert "Disable nitrite test temporarily #4525"
     new 4302043554 Fix #4525 to add some substitutions in podam

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../nitrite/graal/PodamSubstitutions.java          | 107 +++++++++++++++++++++
 integration-tests/pom.xml                          |   2 +-
 tooling/scripts/test-categories.yaml               |   1 +
 3 files changed, 109 insertions(+), 1 deletion(-)
 create mode 100644 extensions/nitrite/runtime/src/main/java/org/apache/camel/quarkus/component/nitrite/graal/PodamSubstitutions.java


[camel-quarkus] 01/02: Revert "Disable nitrite test temporarily #4525"

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit e4b23d9c9ae236168833337ea02d200aaa36a7ce
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Thu Feb 9 22:20:12 2023 +0800

    Revert "Disable nitrite test temporarily #4525"
    
    This reverts commit 662afe0cde628b9e707b9cdc1d1b41f2f153ee1d.
---
 integration-tests/pom.xml            | 2 +-
 tooling/scripts/test-categories.yaml | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 2a33b95fa9..23f093cfbe 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -166,7 +166,7 @@
         <module>mybatis</module>
         <module>nats</module>
         <module>netty</module>
-        <!--<module>nitrite</module> https://github.com/apache/camel-quarkus/issues/4525 -->
+        <module>nitrite</module>
         <module>oaipmh</module>
         <module>ognl</module>
         <module>olingo4</module>
diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml
index 7ba11e999d..df8b4d4b3a 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -187,4 +187,5 @@ group-13:
   - sap-netweaver
   - servicenow
   - slack
+  - nitrite
   - pgevent


[camel-quarkus] 02/02: Fix #4525 to add some substitutions in podam

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 4302043554f94b89f3bc5c9a5ebef88db9b2c820
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Fri Feb 10 15:06:07 2023 +0800

    Fix #4525 to add some substitutions in podam
---
 .../nitrite/graal/PodamSubstitutions.java          | 107 +++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/extensions/nitrite/runtime/src/main/java/org/apache/camel/quarkus/component/nitrite/graal/PodamSubstitutions.java b/extensions/nitrite/runtime/src/main/java/org/apache/camel/quarkus/component/nitrite/graal/PodamSubstitutions.java
new file mode 100644
index 0000000000..1fb3f80c88
--- /dev/null
+++ b/extensions/nitrite/runtime/src/main/java/org/apache/camel/quarkus/component/nitrite/graal/PodamSubstitutions.java
@@ -0,0 +1,107 @@
+/*
+ * 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.component.nitrite.graal;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import uk.co.jemos.podam.api.AttributeMetadata;
+import uk.co.jemos.podam.api.ClassAttribute;
+import uk.co.jemos.podam.api.DataProviderStrategy;
+import uk.co.jemos.podam.api.MapArguments;
+import uk.co.jemos.podam.api.PodamFactoryImpl;
+import uk.co.jemos.podam.common.ManufacturingContext;
+import uk.co.jemos.podam.typeManufacturers.ArrayTypeManufacturerImpl;
+
+final public class PodamSubstitutions {
+
+}
+
+@TargetClass(PodamFactoryImpl.class)
+final class PodamFactoryImplSubstitutions {
+
+    @Substitute
+    private Object[] getParameterValuesForConstructor(
+            Constructor<?> constructor, Class<?> pojoClass,
+            ManufacturingContext manufacturingCtx,
+            Map map,
+            Type... genericTypeArgs)
+            throws InstantiationException, IllegalAccessException,
+            InvocationTargetException, ClassNotFoundException {
+        return new Object[0];
+    }
+
+    @Substitute
+    private Object[] getParameterValuesForMethod(
+            Method method, Class<?> pojoClass,
+            ManufacturingContext manufacturingCtx, Map<String, Type> typeArgsMap,
+            Type... genericTypeArgs)
+            throws InstantiationException, IllegalAccessException,
+            InvocationTargetException, ClassNotFoundException {
+        return new Object[0];
+    }
+
+    @Substitute
+    private void fillMap(MapArguments mapArguments, ManufacturingContext manufacturingCtx)
+            throws InstantiationException, IllegalAccessException,
+            InvocationTargetException, ClassNotFoundException {
+    }
+
+    @Substitute
+    private void fillCollection(ManufacturingContext manufacturingCtx,
+            List<Annotation> annotations, String attributeName,
+            Collection<? super Object> collection,
+            Class<?> collectionElementType, Type... genericTypeArgs)
+            throws InstantiationException, IllegalAccessException,
+            InvocationTargetException, ClassNotFoundException {
+    }
+
+    @Substitute
+    private void fillArray(Object array, String attributeName, Class<?> elementType,
+            Type genericElementType, List<Annotation> annotations,
+            ManufacturingContext manufacturingCtx,
+            Map<String, Type> typeArgsMap)
+            throws InstantiationException, IllegalAccessException,
+            InvocationTargetException, ClassNotFoundException {
+    }
+
+    @Substitute
+    private <T> boolean populateReadWriteField(T pojo, ClassAttribute attribute,
+            Map<String, Type> typeArgsMap, ManufacturingContext manufacturingCtx)
+            throws InstantiationException, IllegalAccessException,
+            InvocationTargetException, ClassNotFoundException {
+        return false;
+    }
+}
+
+@TargetClass(ArrayTypeManufacturerImpl.class)
+final class ArrayTypeManufacturerImplSubstitutions {
+    @Substitute
+    public Cloneable getType(DataProviderStrategy strategy,
+            AttributeMetadata attributeMetadata,
+            Map<String, Type> genericTypesArgumentsMap) {
+        return null;
+    }
+}