提交 5b0c2574 编写于 作者: D duke

Merge

......@@ -377,3 +377,4 @@ d94d54a3192fea79234c3ac55cd0b4052d45e954 jdk-9+130
a24702d4d5ab0015a5c553ed57f66fce7d85155e jdk-9+132
be1218f792a450dfb5d4b1f82616b9d95a6a732e jdk-9+133
065724348690eda41fc69112278d8da6dcde548c jdk-9+134
82b94cb5f342319d2cda77f9fa59703ad7fde576 jdk-9+135
......@@ -377,3 +377,4 @@ f7e1d5337c2e550fe553df7a3886bbed80292ecd jdk-9+131
1ab4b9399c4cba584f66c1c088188f2f565fbf9c jdk-9+132
2021bfedf1c478a4808a7711a6090682a12f4c0e jdk-9+133
1a497f5ca0cfd88115cc7daa8af8a62b8741caf2 jdk-9+134
094d0db606db976045f594dba47d4593b715cc81 jdk-9+135
......@@ -537,3 +537,4 @@ e96b34b76d863ed1fa04e0eeb3f297ac17b490fd jdk-9+129
713951c08aa26813375175c2ab6cc99ff2a56903 jdk-9+132
a25e0fb6033245ab075136e744d362ce765464cd jdk-9+133
b8b694c6b4d2ab0939aed7adaf0eec1ac321a085 jdk-9+134
3b1c4562953db47e36b237a500f368d5c9746d47 jdk-9+135
......@@ -377,3 +377,4 @@ e66cdc2de6b02443911d386fc9217b0d824d0686 jdk-9+130
907445d85e680ea410fe2c83c0ec64b5508e4f3e jdk-9+132
9490ba2e5e41685c858a0ca2a6ec87611eb011c6 jdk-9+133
1c6c21d87aa459d82425e1fddc9ce8647aebde34 jdk-9+134
f695240370c77a25fed88225a392e7d530cb4d78 jdk-9+135
/*
* 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;
}
......@@ -358,4 +358,3 @@ public class XMLGregorianCalendarTest {
private final int undef = DatatypeConstants.FIELD_UNDEFINED;
}
......@@ -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();
}
}
......@@ -229,5 +229,3 @@ public class SAXParserFactTest {
assertFalse(spf.getFeature(EXTERNAL_P_ENTITIES));
}
}
......@@ -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;
}
}
......@@ -431,5 +431,3 @@ public class SAXTFactoryTest {
assertTrue(compareWithGold(goldFile, outputFile));
}
}
......@@ -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 {
}
}
}
......@@ -404,4 +404,3 @@ public class SchemaFactoryTest {
private Document xsdDoc2;
private byte[] xml;
}
......@@ -148,4 +148,3 @@ public class ValidatorHandlerTest {
private Schema schema;
}
......@@ -209,4 +209,3 @@ public class ValidatorTest {
private Document xmlDoc;
}
......@@ -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");
}
}
......@@ -48,4 +48,3 @@ public class CommentTest extends AbstractCharacterDataTest {
return document.createComment(text);
}
}
......@@ -175,4 +175,3 @@ public class DocumentTest {
doc.createElement("!nc$%^*(!");
}
}
......@@ -129,4 +129,3 @@ public class DomImplementationTest {
assertEquals(documentType.getName(), name);
}
}
......@@ -61,4 +61,3 @@ public class EntityChildTest {
assertEquals(nl.getLength(), 3);
}
}
......@@ -211,4 +211,3 @@ public class NodeTest {
transformer.transform(domSource, streamResult);
}
}
......@@ -74,4 +74,3 @@ public class TextTest extends AbstractCharacterDataTest {
}
}
......@@ -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));
}
}
......@@ -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();
}
}
......@@ -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) {
}
}
......@@ -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));
}
}
......@@ -24,4 +24,4 @@
module test {
requires java.xml;
exports test;
}
\ No newline at end of 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;
}
\ No newline at end of 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;
}
\ No newline at end of file
}
......@@ -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 {
}
}
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册