This commit is contained in:
Lana Steuck 2016-09-08 22:13:43 +00:00
commit 701a964369
407 changed files with 83 additions and 466 deletions

View File

@ -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");

View File

@ -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?

View File

@ -1072,4 +1072,3 @@ public abstract class XMLGregorianCalendar
@Override
public abstract Object clone();
}

View File

@ -92,4 +92,3 @@ module java.xml {
uses javax.xml.xpath.XPathFactory;
uses org.xml.sax.XMLReader;
}

View File

@ -30,4 +30,3 @@ module jdk.xml.dom {
exports org.w3c.dom.stylesheets;
exports org.w3c.dom.xpath;
}

View File

@ -587,4 +587,3 @@ public class DurationTest {
private final BigInteger one = BigInteger.ONE;
}

View File

@ -77,4 +77,3 @@ public class FactoryNewInstanceTest {
}
}

View File

@ -358,4 +358,3 @@ public class XMLGregorianCalendarTest {
private final int undef = DatatypeConstants.FIELD_UNDEFINED;
}

View File

@ -105,5 +105,3 @@ public class DBFNamespaceTest {
}
}
}

View File

@ -531,5 +531,3 @@ public class DocumentBuilderFactoryTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -157,5 +157,3 @@ public class DocumentBuilderImpl01 implements EntityResolver {
return null;
}
}

View File

@ -86,5 +86,3 @@ public class FactoryConfErrorTest {
DocumentBuilderFactory.newInstance();
}
}

View File

@ -78,5 +78,3 @@ public class SAXFactoryNewInstanceTest {
}
}

View File

@ -229,5 +229,3 @@ public class SAXParserFactTest {
assertFalse(spf.getFeature(EXTERNAL_P_ENTITIES));
}
}

View File

@ -502,5 +502,3 @@ public class SAXParserTest {
}
}
}

View File

@ -269,5 +269,3 @@ public class SAXParserTest02 {
}
}
}

View File

@ -116,5 +116,3 @@ public class SAXParserTest03 {
}
}

View File

@ -82,4 +82,3 @@ public class XMLEventFactoryNewInstanceTest {
}
}

View File

@ -82,4 +82,3 @@ public class XMLInputFactoryNewInstanceTest {
}
}

View File

@ -67,5 +67,3 @@ public class Bug6384418Test {
}
}

View File

@ -118,5 +118,3 @@ public class DOMResultTest {
writeNodes(kids.item(i), bWriter);
}
}

View File

@ -104,5 +104,3 @@ public class ErrorListenerTest implements ErrorListener {
this.status = ListenerStatus.FATAL;
}
}

View File

@ -105,5 +105,3 @@ public class SAXSourceTest {
}
}
}

View File

@ -431,5 +431,3 @@ public class SAXTFactoryTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -106,5 +106,3 @@ public class StreamResultTest {
});
}
}

View File

@ -239,5 +239,3 @@ public class TfClearParamTest {
assertNull(transformer.getParameter(LONG_PARAM_NAME));
}
}

View File

@ -384,5 +384,3 @@ public class TransformTest {
private Document xmlDoc;
}

View File

@ -105,5 +105,3 @@ public class TransformerExcpTest {
assertNotNull(te.initCause(null));
}
}

View File

@ -141,5 +141,3 @@ public class TransformerFactoryTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -207,5 +207,3 @@ class MyErrorListener implements ErrorListener {
System.out.println(" In fatal");
}
}

View File

@ -85,5 +85,3 @@ public class TransformerTest02 {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -94,5 +94,3 @@ public class TransformerTest03 {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -262,5 +262,3 @@ public class URIResolverTest implements URIResolver {
}
}
}

View File

@ -54,5 +54,3 @@ public class TFCErrorTest {
}
}
}

View File

@ -404,4 +404,3 @@ public class SchemaFactoryTest {
private Document xsdDoc2;
private byte[] xml;
}

View File

@ -95,4 +95,3 @@ public class TypeInfoProviderTest {
}
}

View File

@ -148,4 +148,3 @@ public class ValidatorHandlerTest {
private Schema schema;
}

View File

@ -209,4 +209,3 @@ public class ValidatorTest {
private Document xmlDoc;
}

View File

@ -491,5 +491,3 @@ public class XPathExpressionTest {
}
}
}

View File

@ -218,5 +218,3 @@ public class XPathFactoryTest {
assertNotNull(XPathFactory.newInstance(DOM_OBJECT_MODEL));
}
}

View File

@ -82,5 +82,3 @@ public class XPathFunctionResolverTest {
assertEquals(xpath.evaluate(null, "5"), "2");
}
}

View File

@ -757,5 +757,3 @@ public class XPathTest {
}
}
}

View File

@ -151,4 +151,3 @@ public class AttrTest {
}
}

View File

@ -48,4 +48,3 @@ public class CommentTest extends AbstractCharacterDataTest {
return document.createComment(text);
}
}

View File

@ -175,4 +175,3 @@ public class DocumentTest {
doc.createElement("!nc$%^*(!");
}
}

View File

@ -92,4 +92,3 @@ public class DocumentTypeTest {
}
}

View File

@ -129,4 +129,3 @@ public class DomImplementationTest {
assertEquals(documentType.getName(), name);
}
}

View File

@ -255,4 +255,3 @@ public class ElementTest {
}
}

View File

@ -61,4 +61,3 @@ public class EntityChildTest {
assertEquals(nl.getLength(), 3);
}
}

View File

@ -121,4 +121,3 @@ public class NamedNodeMapTest {
}
}

View File

@ -64,4 +64,3 @@ public class NodeListTest {
}
}

View File

@ -211,4 +211,3 @@ public class NodeTest {
transformer.transform(domSource, streamResult);
}
}

View File

@ -74,4 +74,3 @@ public class NotationTest {
}
}

View File

@ -54,4 +54,3 @@ public class PITest {
}
}

View File

@ -74,4 +74,3 @@ public class TextTest extends AbstractCharacterDataTest {
}
}

View File

@ -140,4 +140,3 @@ public class TypeInfoTest {
}

View File

@ -202,5 +202,3 @@ public class AttrImplTest {
attr.removeAttribute(1);
}
}

View File

@ -74,5 +74,3 @@ public class AttributesNSTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -76,5 +76,3 @@ public class AttributesTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -264,5 +264,3 @@ class MyContentHandler extends XMLFilterImpl implements AutoCloseable {
bWriter.close();
}
}

View File

@ -272,5 +272,3 @@ class MyDefaultHandler extends DefaultHandler {
}
}
}

View File

@ -135,5 +135,3 @@ class MyErrorHandler extends XMLFilterImpl implements AutoCloseable {
bWriter.close();
}
}

View File

@ -131,5 +131,3 @@ public class NSSupportTest {
assertNull(support.getURI(DC_PREFIX));
}
}

View File

@ -168,5 +168,3 @@ public class NSTableTest {
assertFalse(spf.getFeature(NAMESPACE_PREFIXES));
}
}

View File

@ -265,5 +265,3 @@ public class ParserAdapterTest {
}
}
}

View File

@ -143,5 +143,3 @@ class MyEntityResolver extends XMLFilterImpl implements AutoCloseable {
}
}
}

View File

@ -107,5 +107,3 @@ public class SAXParserNSTableTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -285,5 +285,3 @@ class MyXMLFilter extends XMLFilterImpl implements AutoCloseable {
bWriter.close();
}
}

View File

@ -246,5 +246,3 @@ public class XMLFilterTest {
}
}
}

View File

@ -112,5 +112,3 @@ public class XMLReaderAdapterTest {
}
}
}

View File

@ -76,5 +76,3 @@ public class XMLReaderFactoryTest {
XMLReaderFactory.createXMLReader("org.apache.crimson.parser.ABCD");
}
}

View File

@ -131,5 +131,3 @@ public class XMLReaderNSTableTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}

View File

@ -671,5 +671,3 @@ class MyDeclHandler implements DeclHandler {
public void internalEntityDecl(String name, String value) {
}
}

View File

@ -145,4 +145,3 @@ public class AstroTest {
}
}
}

View File

@ -182,4 +182,3 @@ public class DocumentLSTest {
return dbf.newDocumentBuilder();
}
}

View File

@ -89,4 +89,3 @@ public class NamespaceContextTest {
assertEquals(QName.valueOf(qname.toString()), qname);
}
}

View File

@ -48,4 +48,3 @@ public class SAX201Test {
reader.setDTDHandler(null); // SAX 2.0.1 allows
}
}

View File

@ -76,4 +76,3 @@ public class SchemaValidationTest {
return spf.newSAXParser();
}
}

View File

@ -171,4 +171,3 @@ public class XPathAPITest {
return new InputSource(filenameToURL(ASTROCAT));
}
}

View File

@ -366,5 +366,3 @@ public class AuctionController {
assertTrue(roletypeInfo.getTypeNamespace().equals(PORTAL_ACCOUNT_NS));
}
}

View File

@ -371,5 +371,3 @@ public class AuctionItemRepository {
assertTrue(compareDocumentWithGold(goldFile, resultFile));
}
}

View File

@ -304,5 +304,3 @@ public class UserController {
assertTrue(compareDocumentWithGold(goldFile, resultFile));
}
}

View File

@ -64,4 +64,3 @@ public class Bug4511326 {
}
}

View File

@ -90,4 +90,3 @@ public class Bug4512806 {
}

View File

@ -62,4 +62,3 @@ public class Bug4515047 {
}
}

View File

@ -128,4 +128,3 @@ public class Bug4515660 {
}
}

View File

@ -81,4 +81,3 @@ public class Bug4693341 {
}
}

View File

@ -81,4 +81,3 @@ public class Bug4848653 {
}
}

View File

@ -247,4 +247,3 @@ public class Bug4858685 {
}
}

View File

@ -24,4 +24,4 @@
module test {
requires java.xml;
exports test;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -75,4 +75,3 @@ public class Bug6350682 {
}
}
}

View File

@ -68,4 +68,3 @@ public class Bug6723276Test {
}
}

View File

@ -486,4 +486,3 @@ public class Bug6941169Test {
return document;
}
}

View File

@ -114,4 +114,3 @@ public class Bug7143711Test {
}
}
}

View File

@ -213,4 +213,3 @@ public class Sources {
return r;
}
}

View File

@ -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";
}

View File

@ -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>";
}

View File

@ -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