aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorasaha <none@none>2015-12-16 15:46:43 -0800
committerasaha <none@none>2015-12-16 15:46:43 -0800
commit5f4f1c35f09fb4607dfd7c1d4ef0d2d4c58baf5d (patch)
tree85828af13095ffc22462db2b02f33a13aaef2cd7 /src
parentc0749fb766b07181c5a2b0119f4605c9911d6b04 (diff)
parentfc3b801ae07a2d08166f956cb1e915be638248d8 (diff)
downloadjdk8u_jaxp-5f4f1c35f09fb4607dfd7c1d4ef0d2d4c58baf5d.tar.gz
Merge
Diffstat (limited to 'src')
-rw-r--r--src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java2
-rw-r--r--src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java2
-rw-r--r--src/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java6
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XML11DocumentScannerImpl.java2
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java5
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java12
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java5
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java2
-rw-r--r--src/com/sun/xml/internal/stream/Entity.java8
9 files changed, 25 insertions, 19 deletions
diff --git a/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java b/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
index a02f458..966d0ca 100644
--- a/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
+++ b/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
@@ -1359,7 +1359,7 @@ public class XSLTErrorResources_de extends ListResourceBundle
{ "optionE", " [-E (Entit\u00E4tsreferenzen nicht einblenden)]"},
{ "optionV", " [-E (Entit\u00E4tsreferenzen nicht einblenden)]"},
{ "optionQC", " [-QC (Stille Musterkonfliktwarnungen)]"},
- { "optionQ", " [-Q (Stiller Modus)]"},
+ { "optionQ", " [-Q (Silent-Modus)]"},
{ "optionLF", " [-LF (Nur Zeilenvorsch\u00FCbe bei Ausgabe verwenden {Standard ist CR/LF})]"},
{ "optionCR", " [-CR (Nur Zeilenschaltungen bei Ausgabe verwenden {Standard ist CR/LF})]"},
{ "optionESCAPE", " [-ESCAPE (Escapezeichen {Standard ist <>&\"'\r\n}]"},
diff --git a/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java b/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
index 57f6b13..2ffbbba 100644
--- a/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
+++ b/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
@@ -1210,7 +1210,7 @@ public class XSLTErrorResources_fr extends ListResourceBundle
"Le nom de fonction ne peut pas \u00EAtre NULL."},
{ ER_XPATH_RESOLVER_NEGATIVE_ARITY,
- "Le nombre d'arguments ne peut pas \u00EAtre n\u00E9gatif."},
+ "L'arit\u00E9 ne peut pas \u00EAtre n\u00E9gative."},
// Warnings...
{ WG_FOUND_CURLYBRACE,
diff --git a/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java b/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java
index 2eb6e57..11b3241 100644
--- a/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java
@@ -932,9 +932,9 @@ class FunctionCall extends Expression {
//Check if FSP and SM - only then proceed with loading
if (namespace != null && isSecureProcessing
&& isExtensionFunctionEnabled
- && (namespace.equals(JAVA_EXT_XALAN)
- || namespace.equals(JAVA_EXT_XSLTC)
- || namespace.equals(JAVA_EXT_XALAN_OLD)
+ && (namespace.startsWith(JAVA_EXT_XALAN)
+ || namespace.startsWith(JAVA_EXT_XSLTC)
+ || namespace.startsWith(JAVA_EXT_XALAN_OLD)
|| namespace.startsWith(XALAN_CLASSPACKAGE_NAMESPACE))) {
_clazz = getXSLTC().loadExternalFunction(_className);
} else {
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XML11DocumentScannerImpl.java b/src/com/sun/org/apache/xerces/internal/impl/XML11DocumentScannerImpl.java
index 6f862d0..5276454 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XML11DocumentScannerImpl.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XML11DocumentScannerImpl.java
@@ -332,7 +332,7 @@ public class XML11DocumentScannerImpl
new Object[]{entityName});
}
}
- fEntityManager.startEntity(false, entityName, true);
+ fEntityManager.startEntity(true, entityName, true);
}
}
}
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java b/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java
index 146aa40..028f6a7 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java
@@ -905,7 +905,7 @@ public class XML11EntityScanner
}
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
- if (fCurrentEntity.reference) {
+ if (fCurrentEntity.isGE) {
checkLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fCurrentEntity, offset, length);
}
content.setValues(fCurrentEntity.ch, offset, length);
@@ -1052,6 +1052,9 @@ public class XML11EntityScanner
}
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
+ if (fCurrentEntity.isGE) {
+ checkLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fCurrentEntity, offset, length);
+ }
content.setValues(fCurrentEntity.ch, offset, length);
// return next character
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
index 44c8398..bf3adc2 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
@@ -1106,7 +1106,7 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
/**
* Starts a named entity.
*
- * @param reference flag to indicate whether the entity is an Entity Reference.
+ * @param isGE flag to indicate whether the entity is a General Entity
* @param entityName The name of the entity to start.
* @param literal True if this entity is started within a literal
* value.
@@ -1114,7 +1114,7 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
* @throws IOException Thrown on i/o error.
* @throws XNIException Thrown by entity handler to signal an error.
*/
- public void startEntity(boolean reference, String entityName, boolean literal)
+ public void startEntity(boolean isGE, String entityName, boolean literal)
throws IOException, XNIException {
// was entity declared?
@@ -1238,7 +1238,7 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
}
// start the entity
- startEntity(reference, entityName, xmlInputSource, literal, external);
+ startEntity(isGE, entityName, xmlInputSource, literal, external);
} // startEntity(String,boolean)
@@ -1287,7 +1287,7 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
* This method can be used to insert an application defined XML
* entity stream into the parsing stream.
*
- * @param reference flag to indicate whether the entity is an Entity Reference.
+ * @param isGE flag to indicate whether the entity is a General Entity
* @param name The name of the entity.
* @param xmlInputSource The input source of the entity.
* @param literal True if this entity is started within a
@@ -1297,12 +1297,12 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
* @throws IOException Thrown on i/o error.
* @throws XNIException Thrown by entity handler to signal an error.
*/
- public void startEntity(boolean reference, String name,
+ public void startEntity(boolean isGE, String name,
XMLInputSource xmlInputSource,
boolean literal, boolean isExternal)
throws IOException, XNIException {
- String encoding = setupCurrentEntity(reference, name, xmlInputSource, literal, isExternal);
+ String encoding = setupCurrentEntity(isGE, name, xmlInputSource, literal, isExternal);
//when entity expansion limit is set by the Application, we need to
//check for the entity expansion limit set by the parser, if number of entity
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java
index 4e12d15..1c0eca6 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java
@@ -1038,7 +1038,7 @@ public class XMLEntityScanner implements XMLLocator {
}
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
- if (fCurrentEntity.reference) {
+ if (fCurrentEntity.isGE) {
checkLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fCurrentEntity, offset, length);
}
@@ -1205,6 +1205,9 @@ public class XMLEntityScanner implements XMLLocator {
}
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
+ if (fCurrentEntity.isGE) {
+ checkLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fCurrentEntity, offset, length);
+ }
content.setValues(fCurrentEntity.ch, offset, length);
// return next character
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
index 48462a8..fc46488 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
@@ -947,7 +947,7 @@ public abstract class XMLScanner
new Object[]{entityName});
}
}
- fEntityManager.startEntity(false, entityName, true);
+ fEntityManager.startEntity(true, entityName, true);
}
}
}
diff --git a/src/com/sun/xml/internal/stream/Entity.java b/src/com/sun/xml/internal/stream/Entity.java
index fb60ca3..9c2a8ad 100644
--- a/src/com/sun/xml/internal/stream/Entity.java
+++ b/src/com/sun/xml/internal/stream/Entity.java
@@ -344,8 +344,8 @@ public abstract class Entity {
// to know that prolog is read
public boolean xmlDeclChunkRead = false;
- // flag to indicate whether the Entity is an Entity Reference
- public boolean reference = false;
+ // flag to indicate whether the Entity is a General Entity
+ public boolean isGE = false;
/** returns the name of the current encoding
* @return current encoding name
@@ -391,11 +391,11 @@ public abstract class Entity {
//
/** Constructs a scanned entity. */
- public ScannedEntity(boolean reference, String name,
+ public ScannedEntity(boolean isGE, String name,
XMLResourceIdentifier entityLocation,
InputStream stream, Reader reader,
String encoding, boolean literal, boolean mayReadChunks, boolean isExternal) {
- this.reference = reference;
+ this.isGE = isGE;
this.name = name ;
this.entityLocation = entityLocation;
this.stream = stream;