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

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

commit 075bf62237a2ba16a66069e87d937d07b1b54cf2
Author: lburgazzoli <[email protected]>
AuthorDate: Wed Apr 1 17:07:08 2020 +0200

    camle-tagsoup extension tests fails in native mode on Jdk 11 #1010
---
 .../graal/TransformerFactorySubstitution.java      | 37 ++++++++++++++++++++++
 .../camel/quarkus/component/xml/it/XmlTest.java    |  5 ---
 2 files changed, 37 insertions(+), 5 deletions(-)

diff --git 
a/extensions-support/xalan/runtime/src/main/java/org/apache/camel/quarkus/support/xalan/graal/TransformerFactorySubstitution.java
 
b/extensions-support/xalan/runtime/src/main/java/org/apache/camel/quarkus/support/xalan/graal/TransformerFactorySubstitution.java
new file mode 100644
index 0000000..d8438c1
--- /dev/null
+++ 
b/extensions-support/xalan/runtime/src/main/java/org/apache/camel/quarkus/support/xalan/graal/TransformerFactorySubstitution.java
@@ -0,0 +1,37 @@
+/*
+ * 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.support.xalan.graal;
+
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import org.apache.xalan.xsltc.trax.TransformerFactoryImpl;
+
+@TargetClass(className = "javax.xml.transform.TransformerFactory")
+final class TransformerFactorySubstitution {
+    @Substitute
+    public static TransformerFactory newDefaultInstance() {
+        return new TransformerFactoryImpl();
+    }
+
+    @Substitute
+    public static TransformerFactory newInstance() throws 
TransformerFactoryConfigurationError {
+        return newDefaultInstance();
+    }
+}
diff --git 
a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java
 
b/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java
index 3d093d1..a2c0000 100644
--- 
a/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java
+++ 
b/integration-tests/xml/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlTest.java
@@ -18,7 +18,6 @@ package org.apache.camel.quarkus.component.xml.it;
 
 import java.nio.charset.Charset;
 
-import io.quarkus.test.junit.DisabledOnNativeImage;
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
@@ -30,8 +29,6 @@ import static org.hamcrest.Matchers.is;
 
 @QuarkusTest
 class XmlTest {
-
-    @DisabledOnNativeImage("Could not load the propery file 
'output_xml.properties' for output method 'xml'")
     @Test
     public void htmlParse() throws Exception {
         String html = 
IOUtils.toString(getClass().getResourceAsStream("/test.html"), 
Charset.forName("UTF-8"));
@@ -62,7 +59,6 @@ class XmlTest {
                 actual);
     }
 
-    @DisabledOnNativeImage("Could not load the propery file 
'output_xml.properties' for output method 'xml'")
     @Test
     public void htmlTransform() throws Exception {
         String html = 
IOUtils.toString(getClass().getResourceAsStream("/test.html"), 
Charset.forName("UTF-8"));
@@ -81,7 +77,6 @@ class XmlTest {
                 actual);
     }
 
-    @DisabledOnNativeImage("Could not load the propery file 
'output_xml.properties' for output method 'xml'")
     @Test
     public void htmlToText() throws Exception {
         String html = 
IOUtils.toString(getClass().getResourceAsStream("/test.html"), 
Charset.forName("UTF-8"));

Reply via email to