Skip to content

Commit

Permalink
camle-tagsoup extension tests fails in native mode on Jdk 11 #1010
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Apr 1, 2020
1 parent 69ade67 commit 9af2546
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

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;
Expand All @@ -30,8 +29,6 @@

@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"));
Expand Down Expand Up @@ -62,7 +59,6 @@ public void xslt() {
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"));
Expand All @@ -81,7 +77,6 @@ public void htmlTransform() throws Exception {
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"));
Expand Down

0 comments on commit 9af2546

Please sign in to comment.