Merge
This commit is contained in:
commit
701a964369
@ -1,13 +1,14 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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
|
||||
* 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
|
||||
*
|
||||
@ -17,9 +18,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/*
|
||||
* $Id: TransletOutput.java,v 1.2.4.1 2005/09/05 09:19:44 pvedula Exp $
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xalan.internal.xsltc.compiler;
|
||||
|
||||
@ -35,6 +33,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
|
||||
import jdk.xml.internal.JdkXmlFeatures;
|
||||
|
||||
/**
|
||||
* @author Morten Jorgensen
|
||||
@ -103,8 +102,10 @@ final class TransletOutput extends Instruction {
|
||||
final InstructionList il = methodGen.getInstructionList();
|
||||
final boolean isSecureProcessing = classGen.getParser().getXSLTC()
|
||||
.isSecureProcessing();
|
||||
final boolean isExtensionFunctionEnabled = classGen.getParser().getXSLTC()
|
||||
.getFeature(JdkXmlFeatures.XmlFeature.ENABLE_EXTENSION_FUNCTION);
|
||||
|
||||
if (isSecureProcessing) {
|
||||
if (isSecureProcessing && !isExtensionFunctionEnabled) {
|
||||
int index = cpg.addMethodref(BASIS_LIBRARY_CLASS,
|
||||
"unallowed_extension_elementF",
|
||||
"(Ljava/lang/String;)V");
|
||||
|
@ -111,6 +111,9 @@ public abstract class AbstractTranslet implements Translet {
|
||||
|
||||
private boolean _useServicesMechanism;
|
||||
|
||||
// The OutputStream for redirect function
|
||||
private FileOutputStream output = null;
|
||||
|
||||
/**
|
||||
* protocols allowed for external references set by the stylesheet processing instruction, Document() function, Import and Include element.
|
||||
*/
|
||||
@ -567,9 +570,10 @@ public abstract class AbstractTranslet implements Translet {
|
||||
dir.mkdirs();
|
||||
}
|
||||
|
||||
output = new FileOutputStream(filename, append);
|
||||
factory.setEncoding(_encoding);
|
||||
factory.setOutputMethod(_method);
|
||||
factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append)));
|
||||
factory.setOutputStream(new BufferedOutputStream(output));
|
||||
factory.setOutputType(TransletOutputHandlerFactory.STREAM);
|
||||
|
||||
final SerializationHandler handler
|
||||
@ -594,6 +598,9 @@ public abstract class AbstractTranslet implements Translet {
|
||||
try {
|
||||
handler.endDocument();
|
||||
handler.close();
|
||||
if (output != null) {
|
||||
output.close();
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
// what can you do?
|
||||
|
@ -1072,4 +1072,3 @@ public abstract class XMLGregorianCalendar
|
||||
@Override
|
||||
public abstract Object clone();
|
||||
}
|
||||
|
||||
|
@ -92,4 +92,3 @@ module java.xml {
|
||||
uses javax.xml.xpath.XPathFactory;
|
||||
uses org.xml.sax.XMLReader;
|
||||
}
|
||||
|
||||
|
@ -30,4 +30,3 @@ module jdk.xml.dom {
|
||||
exports org.w3c.dom.stylesheets;
|
||||
exports org.w3c.dom.xpath;
|
||||
}
|
||||
|
||||
|
@ -587,4 +587,3 @@ public class DurationTest {
|
||||
private final BigInteger one = BigInteger.ONE;
|
||||
|
||||
}
|
||||
|
||||
|
@ -77,4 +77,3 @@ public class FactoryNewInstanceTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -358,4 +358,3 @@ public class XMLGregorianCalendarTest {
|
||||
private final int undef = DatatypeConstants.FIELD_UNDEFINED;
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,5 +105,3 @@ public class DBFNamespaceTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -531,5 +531,3 @@ public class DocumentBuilderFactoryTest {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -157,5 +157,3 @@ public class DocumentBuilderImpl01 implements EntityResolver {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -86,5 +86,3 @@ public class FactoryConfErrorTest {
|
||||
DocumentBuilderFactory.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,5 +78,3 @@ public class SAXFactoryNewInstanceTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -229,5 +229,3 @@ public class SAXParserFactTest {
|
||||
assertFalse(spf.getFeature(EXTERNAL_P_ENTITIES));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -502,5 +502,3 @@ public class SAXParserTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -269,5 +269,3 @@ public class SAXParserTest02 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -116,5 +116,3 @@ public class SAXParserTest03 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,4 +82,3 @@ public class XMLEventFactoryNewInstanceTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -82,4 +82,3 @@ public class XMLInputFactoryNewInstanceTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -67,5 +67,3 @@ public class Bug6384418Test {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,5 +118,3 @@ public class DOMResultTest {
|
||||
writeNodes(kids.item(i), bWriter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,5 +104,3 @@ public class ErrorListenerTest implements ErrorListener {
|
||||
this.status = ListenerStatus.FATAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,5 +105,3 @@ public class SAXSourceTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -431,5 +431,3 @@ public class SAXTFactoryTest {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -106,5 +106,3 @@ public class StreamResultTest {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -239,5 +239,3 @@ public class TfClearParamTest {
|
||||
assertNull(transformer.getParameter(LONG_PARAM_NAME));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -384,5 +384,3 @@ public class TransformTest {
|
||||
private Document xmlDoc;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,5 +105,3 @@ public class TransformerExcpTest {
|
||||
assertNotNull(te.initCause(null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -141,5 +141,3 @@ public class TransformerFactoryTest {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -207,5 +207,3 @@ class MyErrorListener implements ErrorListener {
|
||||
System.out.println(" In fatal");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -85,5 +85,3 @@ public class TransformerTest02 {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,5 +94,3 @@ public class TransformerTest03 {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -262,5 +262,3 @@ public class URIResolverTest implements URIResolver {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,5 +54,3 @@ public class TFCErrorTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -404,4 +404,3 @@ public class SchemaFactoryTest {
|
||||
private Document xsdDoc2;
|
||||
private byte[] xml;
|
||||
}
|
||||
|
||||
|
@ -95,4 +95,3 @@ public class TypeInfoProviderTest {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,4 +148,3 @@ public class ValidatorHandlerTest {
|
||||
private Schema schema;
|
||||
|
||||
}
|
||||
|
||||
|
@ -209,4 +209,3 @@ public class ValidatorTest {
|
||||
private Document xmlDoc;
|
||||
|
||||
}
|
||||
|
||||
|
@ -491,5 +491,3 @@ public class XPathExpressionTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -218,5 +218,3 @@ public class XPathFactoryTest {
|
||||
assertNotNull(XPathFactory.newInstance(DOM_OBJECT_MODEL));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,5 +82,3 @@ public class XPathFunctionResolverTest {
|
||||
assertEquals(xpath.evaluate(null, "5"), "2");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -757,5 +757,3 @@ public class XPathTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -151,4 +151,3 @@ public class AttrTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -48,4 +48,3 @@ public class CommentTest extends AbstractCharacterDataTest {
|
||||
return document.createComment(text);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,4 +175,3 @@ public class DocumentTest {
|
||||
doc.createElement("!nc$%^*(!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,4 +92,3 @@ public class DocumentTypeTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -129,4 +129,3 @@ public class DomImplementationTest {
|
||||
assertEquals(documentType.getName(), name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,4 +255,3 @@ public class ElementTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,4 +61,3 @@ public class EntityChildTest {
|
||||
assertEquals(nl.getLength(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,4 +121,3 @@ public class NamedNodeMapTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -64,4 +64,3 @@ public class NodeListTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -211,4 +211,3 @@ public class NodeTest {
|
||||
transformer.transform(domSource, streamResult);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,4 +74,3 @@ public class NotationTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -54,4 +54,3 @@ public class PITest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -74,4 +74,3 @@ public class TextTest extends AbstractCharacterDataTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -140,4 +140,3 @@ public class TypeInfoTest {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -202,5 +202,3 @@ public class AttrImplTest {
|
||||
attr.removeAttribute(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,5 +74,3 @@ public class AttributesNSTest {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,5 +76,3 @@ public class AttributesTest {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -264,5 +264,3 @@ class MyContentHandler extends XMLFilterImpl implements AutoCloseable {
|
||||
bWriter.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -272,5 +272,3 @@ class MyDefaultHandler extends DefaultHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -135,5 +135,3 @@ class MyErrorHandler extends XMLFilterImpl implements AutoCloseable {
|
||||
bWriter.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -131,5 +131,3 @@ public class NSSupportTest {
|
||||
assertNull(support.getURI(DC_PREFIX));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,5 +168,3 @@ public class NSTableTest {
|
||||
assertFalse(spf.getFeature(NAMESPACE_PREFIXES));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -265,5 +265,3 @@ public class ParserAdapterTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -143,5 +143,3 @@ class MyEntityResolver extends XMLFilterImpl implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,5 +107,3 @@ public class SAXParserNSTableTest {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -285,5 +285,3 @@ class MyXMLFilter extends XMLFilterImpl implements AutoCloseable {
|
||||
bWriter.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -246,5 +246,3 @@ public class XMLFilterTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,5 +112,3 @@ public class XMLReaderAdapterTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,5 +76,3 @@ public class XMLReaderFactoryTest {
|
||||
XMLReaderFactory.createXMLReader("org.apache.crimson.parser.ABCD");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -131,5 +131,3 @@ public class XMLReaderNSTableTest {
|
||||
assertTrue(compareWithGold(goldFile, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -671,5 +671,3 @@ class MyDeclHandler implements DeclHandler {
|
||||
public void internalEntityDecl(String name, String value) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -145,4 +145,3 @@ public class AstroTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -182,4 +182,3 @@ public class DocumentLSTest {
|
||||
return dbf.newDocumentBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,4 +89,3 @@ public class NamespaceContextTest {
|
||||
assertEquals(QName.valueOf(qname.toString()), qname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,4 +48,3 @@ public class SAX201Test {
|
||||
reader.setDTDHandler(null); // SAX 2.0.1 allows
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,4 +76,3 @@ public class SchemaValidationTest {
|
||||
return spf.newSAXParser();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,4 +171,3 @@ public class XPathAPITest {
|
||||
return new InputSource(filenameToURL(ASTROCAT));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,5 +366,3 @@ public class AuctionController {
|
||||
assertTrue(roletypeInfo.getTypeNamespace().equals(PORTAL_ACCOUNT_NS));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -371,5 +371,3 @@ public class AuctionItemRepository {
|
||||
assertTrue(compareDocumentWithGold(goldFile, resultFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -304,5 +304,3 @@ public class UserController {
|
||||
assertTrue(compareDocumentWithGold(goldFile, resultFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,4 +64,3 @@ public class Bug4511326 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -90,4 +90,3 @@ public class Bug4512806 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -62,4 +62,3 @@ public class Bug4515047 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -128,4 +128,3 @@ public class Bug4515660 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -81,4 +81,3 @@ public class Bug4693341 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -81,4 +81,3 @@ public class Bug4848653 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -247,4 +247,3 @@ public class Bug4858685 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,4 +24,4 @@
|
||||
module test {
|
||||
requires java.xml;
|
||||
exports test;
|
||||
}
|
||||
}
|
||||
|
@ -31,4 +31,4 @@ module xmlprovider1 {
|
||||
provides javax.xml.transform.TransformerFactory with xp1.TransformerFactoryImpl;
|
||||
provides javax.xml.validation.SchemaFactory with xp1.SchemaFactoryImpl;
|
||||
provides javax.xml.xpath.XPathFactory with xp1.XPathFactoryImpl;
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,4 @@ module xmlprovider2 {
|
||||
provides javax.xml.datatype.DatatypeFactory with xp2.DatatypeFactoryImpl;
|
||||
provides javax.xml.stream.XMLEventFactory with xp2.XMLEventFactoryImpl;
|
||||
provides org.xml.sax.XMLReader with xp2.XMLReaderImpl;
|
||||
}
|
||||
}
|
||||
|
@ -75,4 +75,3 @@ public class Bug6350682 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,4 +68,3 @@ public class Bug6723276Test {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -486,4 +486,3 @@ public class Bug6941169Test {
|
||||
return document;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,4 +114,3 @@ public class Bug7143711Test {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,4 +213,3 @@ public class Sources {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,4 +56,3 @@ public class TestSAXDriver extends SAXParserImpl.JAXPSAXParser {
|
||||
|
||||
private static final String ENT_EXP_LIMIT_PROP = "http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit";
|
||||
}
|
||||
|
||||
|
@ -105,4 +105,3 @@ public class TransformationWarningsTest extends WarningsTestBase {
|
||||
+ "</xsl:stylesheet>";
|
||||
private static final String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>";
|
||||
}
|
||||
|
||||
|
@ -85,4 +85,3 @@ public class ValidationWarningsTest extends WarningsTestBase {
|
||||
private static final String xml = "<?xml version='1.0'?><test>Element</test>";
|
||||
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user