diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java
index 1ba2190b65f..a5000b026e1 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@ import jdk.xml.internal.SecuritySupport;
/**
* This is the base class for features and properties
*
- * @LastModified: Mar 2023
+ * @LastModified: Nov 2024
*/
public abstract class FeaturePropertyBase {
@@ -198,7 +198,7 @@ public abstract class FeaturePropertyBase {
*/
void getSystemProperty(Enum> property, String systemProperty) {
try {
- String value = SecuritySupport.getSystemProperty(systemProperty);
+ String value = System.getProperty(systemProperty);
if (value != null) {
values[property.ordinal()] = value;
states[property.ordinal()] = State.SYSTEMPROPERTY;
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java
index c1d910b0616..58971b4d6e2 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,7 +32,7 @@ import jdk.xml.internal.SecuritySupport;
* class and modified to be used as a general utility for creating objects
* dynamically.
*
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
public class ObjectFactory {
@@ -57,14 +57,8 @@ public class ObjectFactory {
* Figure out which ClassLoader to use. For JDK 1.2 and later use
* the context ClassLoader.
*/
- @SuppressWarnings("removal")
public static ClassLoader findClassLoader()
{
- if (System.getSecurityManager()!=null) {
- //this will ensure bootclassloader is used
- return null;
- }
-
// Figure out which ClassLoader to use for loading the provider
// class. If there is a Context ClassLoader then use it.
ClassLoader context = SecuritySupport.getContextClassLoader();
@@ -123,8 +117,7 @@ public class ObjectFactory {
public static Object newInstance(String className, boolean doFallback)
throws ConfigurationError
{
- @SuppressWarnings("removal")
- ClassLoader cl = System.getSecurityManager()!=null ? null : findClassLoader();
+ ClassLoader cl = findClassLoader();
try{
Class> providerClass = findProviderClass(className, cl, doFallback);
Object instance = providerClass.getConstructor().newInstance();
@@ -161,24 +154,6 @@ public class ObjectFactory {
{
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
- @SuppressWarnings("removal")
- SecurityManager security = System.getSecurityManager();
- try{
- if (security != null){
- if (className.startsWith(JAXP_INTERNAL) ||
- className.startsWith(STAX_INTERNAL)) {
- cl = null;
- } else {
- final int lastDot = className.lastIndexOf(".");
- String packageName = className;
- if (lastDot != -1) packageName = className.substring(0, lastDot);
- security.checkPackageAccess(packageName);
- }
- }
- }catch(SecurityException e){
- throw e;
- }
-
Class> providerClass;
if (cl == null) {
providerClass = Class.forName(className, false, ObjectFactory.class.getClassLoader());
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java
index 0c20a0ac919..c34f4fa59eb 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -24,7 +24,7 @@ import java.util.ListResourceBundle;
/**
* @author Morten Jorgensen
- * @LastModified: Jan 2022
+ * @LastModified: Nov 2024
*/
public class ErrorMessages extends ListResourceBundle {
@@ -1028,11 +1028,6 @@ public class ErrorMessages extends ListResourceBundle {
"smaller templates."
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "When Java security is enabled, "
- + "support for deserializing TemplatesImpl is disabled. This can be "
- + "overridden by setting the jdk.xml.enableTemplatesImplDeserialization"
- + " system property to true."},
-
{ErrorMsg.XPATH_GROUP_LIMIT,
"JAXP0801001: the compiler encountered an XPath expression containing "
+ "''{0}'' groups that exceeds the ''{1}'' limit set by ''{2}''."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java
index a73fe47191f..12ec243bbc9 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -24,7 +24,7 @@ import java.util.ListResourceBundle;
/**
* @author Morten Jorgensen
- * @LastModified: Jan 2022
+ * @LastModified: Nov 2024
*/
public class ErrorMessages_de extends ListResourceBundle {
@@ -981,8 +981,6 @@ public class ErrorMessages_de extends ListResourceBundle {
"Interner XSLTC-Fehler: Eine Methode im Translet \u00FCberschreitet die Java Virtual Machine-L\u00E4ngeneinschr\u00E4nkung einer Methode von 64 KB. Ursache hierf\u00FCr sind in der Regel sehr gro\u00DFe Vorlagen in einem Stylesheet. Versuchen Sie, das Stylesheet mit kleineren Vorlagen umzustrukturieren."
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Wenn die Java-Sicherheit aktiviert ist, wird die Unterst\u00FCtzung f\u00FCr das Deserialisieren von TemplatesImpl deaktiviert. Dieses Verhalten kann durch Setzen der Systemeigenschaft jdk.xml.enableTemplatesImplDeserialization auf \"true\" au\u00DFer Kraft gesetzt werden."},
-
{ErrorMsg.XPATH_GROUP_LIMIT,
"JAXP0801001: Im Compiler ist ein XPath-Ausdruck mit {0} Gruppen aufgetreten, der den von \"{2}\" festgelegten Grenzwert \"{1}\" \u00FCberschreitet."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java
index 111b251d48d..099644221a6 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -979,9 +979,6 @@ public class ErrorMessages_es extends ListResourceBundle {
{ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
"Error interno de XSLTC: un m\u00E9todo en el translet excede la limitaci\u00F3n de Java Virtual Machine de longitud de un m\u00E9todo de 64 kilobytes. Normalmente, esto lo causan plantillas en una hoja de estilos demasiado grandes. Pruebe a reestructurar la hoja de estilos para utilizar plantillas m\u00E1s peque\u00F1as."
},
-
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Cuando la seguridad de Java est\u00E1 activada, el soporte para anular la serializaci\u00F3n de TemplatesImpl est\u00E1 desactivado. Esto se puede sustituir definiendo la propiedad del sistema jdk.xml.enableTemplatesImplDeserialization en true."}
-
};
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java
index 1123464069e..5690aff3192 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -980,8 +980,6 @@ public class ErrorMessages_fr extends ListResourceBundle {
"Erreur XSLTC interne : une m\u00E9thode dans le translet d\u00E9passe la limite de la JVM concernant la longueur d'une m\u00E9thode de 64 kilo-octets. En g\u00E9n\u00E9ral, ceci est d\u00FB \u00E0 de tr\u00E8s grands mod\u00E8les dans une feuille de style. Essayez de restructurer la feuille de style pour utiliser des mod\u00E8les plus petits."
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Lorsque la s\u00E9curit\u00E9 Java est activ\u00E9e, la prise en charge de la d\u00E9s\u00E9rialisation de TemplatesImpl est d\u00E9sactiv\u00E9e. La d\u00E9finition de la propri\u00E9t\u00E9 syst\u00E8me jdk.xml.enableTemplatesImplDeserialization sur True permet de remplacer ce param\u00E8tre."}
-
};
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java
index ab05118b8a1..a5c9e0dc348 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -980,8 +980,6 @@ public class ErrorMessages_it extends ListResourceBundle {
"Errore XSLTC interno: un metodo nel translet supera la limitazione Java Virtual Machine relativa alla lunghezza per un metodo di 64 kilobyte. Ci\u00F2 \u00E8 generalmente causato dalle grandi dimensioni dei modelli in un foglio di stile. Provare a ristrutturare il foglio di stile per utilizzare modelli di dimensioni inferiori."
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Quando la sicurezza Java \u00E8 abilitata, il supporto per la deserializzazione TemplatesImpl \u00E8 disabilitato. \u00C8 possibile ignorare questa condizione impostando su true la propriet\u00E0 di sistema jdk.xml.enableTemplatesImplDeserialization."}
-
};
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java
index ba170bdfffa..5e03673aef5 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -24,7 +24,7 @@ import java.util.ListResourceBundle;
/**
* @author Morten Jorgensen
- * @LastModified: Jan 2022
+ * @LastModified: Nov 2024
*/
public class ErrorMessages_ja extends ListResourceBundle {
@@ -981,8 +981,6 @@ public class ErrorMessages_ja extends ListResourceBundle {
"\u5185\u90E8XSLTC\u30A8\u30E9\u30FC: \u30C8\u30E9\u30F3\u30B9\u30EC\u30C3\u30C8\u5185\u306E\u30E1\u30BD\u30C3\u30C9\u304C\u3001Java\u4EEE\u60F3\u30DE\u30B7\u30F3\u306E\u5236\u9650(1\u30E1\u30BD\u30C3\u30C9\u306E\u9577\u3055\u306F\u6700\u592764\u30AD\u30ED\u30D0\u30A4\u30C8)\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002\u4E00\u822C\u7684\u306B\u3001\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u5185\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30B5\u30A4\u30BA\u304C\u5927\u304D\u904E\u304E\u308B\u3053\u3068\u304C\u539F\u56E0\u3068\u3057\u3066\u8003\u3048\u3089\u308C\u307E\u3059\u3002\u5C0F\u3055\u3044\u30B5\u30A4\u30BA\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3001\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u3092\u518D\u69CB\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Java\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u304C\u6709\u52B9\u5316\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001TemplatesImpl\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306E\u30B5\u30DD\u30FC\u30C8\u306F\u7121\u52B9\u5316\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u306F\u3001jdk.xml.enableTemplatesImplDeserialization\u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092true\u306B\u8A2D\u5B9A\u3057\u3066\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3067\u304D\u307E\u3059\u3002"},
-
{ErrorMsg.XPATH_GROUP_LIMIT,
"JAXP0801001: \u30B3\u30F3\u30D1\u30A4\u30E9\u306F\u3001''{2}''\u3067\u8A2D\u5B9A\u3055\u308C\u305F''{1}''\u5236\u9650\u3092\u8D85\u3048\u308B''{0}''\u30B0\u30EB\u30FC\u30D7\u3092\u542B\u3080XPath\u5F0F\u3092\u691C\u51FA\u3057\u307E\u3057\u305F\u3002"},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java
index 79785fb75f0..5128d65cadf 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -980,8 +980,6 @@ public class ErrorMessages_ko extends ListResourceBundle {
"\uB0B4\uBD80 XSLTC \uC624\uB958: translet\uC758 \uBA54\uC18C\uB4DC\uAC00 Java Virtual Machine\uC758 \uBA54\uC18C\uB4DC \uAE38\uC774 \uC81C\uD55C\uC778 64KB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. \uB300\uAC1C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC758 \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uB9E4\uC6B0 \uD06C\uAE30 \uB54C\uBB38\uC5D0 \uBC1C\uC0DD\uD569\uB2C8\uB2E4. \uB354 \uC791\uC740 \uD15C\uD50C\uB9AC\uD2B8\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C \uC7AC\uAD6C\uC131\uD574 \uBCF4\uC2ED\uC2DC\uC624."
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Java \uBCF4\uC548\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 TemplatesImpl \uC9C1\uB82C\uD654 \uD574\uC81C\uC5D0 \uB300\uD55C \uC9C0\uC6D0\uC774 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uB429\uB2C8\uB2E4. jdk.xml.enableTemplatesImplDeserialization \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 true\uB85C \uC124\uC815\uD558\uBA74 \uC774\uB97C \uBB34\uD6A8\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}
-
};
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java
index 25e16e53925..061348dc2e5 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -980,8 +980,6 @@ public class ErrorMessages_pt_BR extends ListResourceBundle {
"Erro interno de XSLTC: um m\u00E9todo no translet excede a limita\u00E7\u00E3o da M\u00E1quina Virtual Java quanto ao tamanho de um m\u00E9todo de de 64 kilobytes. Em geral, essa situa\u00E7\u00E3o \u00E9 causada por modelos de uma folha de estilos que s\u00E3o muito grandes. Tente reestruturar sua folha de estilos de forma a usar modelos menores."
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Quando a seguran\u00E7a do Java est\u00E1 ativada, o suporte para desserializar TemplatesImpl fica desativado. Essa situa\u00E7\u00E3o pode ser corrigida definindo a propriedade do sistema jdk.xml.enableTemplatesImplDeserialization como true."}
-
};
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java
index 153e8fa3d15..78a7a6b92e3 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -980,8 +980,6 @@ public class ErrorMessages_sv extends ListResourceBundle {
"Internt XSLTC-fel: en metod i transleten \u00F6verstiger Java Virtual Machines l\u00E4ngdbegr\u00E4nsning f\u00F6r en metod p\u00E5 64 kilobytes. Det h\u00E4r orsakas vanligen av mycket stora mallar i en formatmall. F\u00F6rs\u00F6k att omstrukturera formatmallen att anv\u00E4nda mindre mallar."
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "N\u00E4r Java-s\u00E4kerheten \u00E4r aktiverad \u00E4r st\u00F6det f\u00F6r avserialisering av TemplatesImpl avaktiverat. Du kan \u00E5sidos\u00E4tta det h\u00E4r genom att st\u00E4lla in systemegenskapen jdk.xml.enableTemplatesImplDeserialization till sant."}
-
};
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java
index 7a96e488a9a..728abc0df37 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -24,7 +24,7 @@ import java.util.ListResourceBundle;
/**
* @author Morten Jorgensen
- * @LastModified: Jan 2022
+ * @LastModified: Nov 2024
*/
public class ErrorMessages_zh_CN extends ListResourceBundle {
@@ -981,8 +981,6 @@ public class ErrorMessages_zh_CN extends ListResourceBundle {
"\u5185\u90E8 XSLTC \u9519\u8BEF: translet \u4E2D\u7684\u65B9\u6CD5\u8D85\u8FC7\u4E86 Java \u865A\u62DF\u673A\u7684\u65B9\u6CD5\u957F\u5EA6\u9650\u5236 64 KB\u3002\u8FD9\u901A\u5E38\u662F\u7531\u4E8E\u6837\u5F0F\u8868\u4E2D\u7684\u6A21\u677F\u975E\u5E38\u5927\u9020\u6210\u7684\u3002\u8BF7\u5C1D\u8BD5\u4F7F\u7528\u8F83\u5C0F\u7684\u6A21\u677F\u91CD\u65B0\u6784\u5EFA\u6837\u5F0F\u8868\u3002"
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "\u542F\u7528\u4E86 Java \u5B89\u5168\u65F6\uFF0C\u5C06\u7981\u7528\u5BF9\u53CD\u5E8F\u5217\u5316 TemplatesImpl \u7684\u652F\u6301\u3002\u53EF\u4EE5\u901A\u8FC7\u5C06 jdk.xml.enableTemplatesImplDeserialization \u7CFB\u7EDF\u5C5E\u6027\u8BBE\u7F6E\u4E3A true \u6765\u8986\u76D6\u6B64\u8BBE\u7F6E\u3002"},
-
{ErrorMsg.XPATH_GROUP_LIMIT,
"JAXP0801001\uFF1A\u7F16\u8BD1\u5668\u9047\u5230\u5305\u542B ''{0}'' \u7EC4\u7684 XPath \u8868\u8FBE\u5F0F\uFF0C\u8BE5\u8868\u8FBE\u5F0F\u8D85\u8FC7\u4E86 ''{2}'' \u8BBE\u7F6E\u7684 ''{1}'' \u9650\u5236\u3002"},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java
index 5ab9c32979f..07f1ff4f63d 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -980,8 +980,6 @@ public class ErrorMessages_zh_TW extends ListResourceBundle {
"\u5167\u90E8 XSLTC \u932F\u8AA4: translet \u4E2D\u7684\u65B9\u6CD5\u8D85\u904E Java \u865B\u64EC\u6A5F\u5668\u5C0D\u65BC\u65B9\u6CD5\u9577\u5EA6 64 KB \u7684\u9650\u5236\u3002\u9019\u901A\u5E38\u662F\u56E0\u70BA\u6A23\u5F0F\u8868\u4E2D\u6709\u975E\u5E38\u5927\u7684\u6A23\u677F\u3002\u8ACB\u5617\u8A66\u91CD\u65B0\u7D44\u7E54\u60A8\u7684\u6A23\u5F0F\u8868\u4EE5\u4F7F\u7528\u8F03\u5C0F\u7684\u6A23\u677F\u3002"
},
- {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "\u555F\u7528 Java \u5B89\u5168\u6642\uFF0C\u6703\u505C\u7528\u9084\u539F\u5E8F\u5217\u5316 TemplatesImpl \u7684\u652F\u63F4\u3002\u5C07 jdk.xml.enableTemplatesImplDeserialization \u7CFB\u7D71\u5C6C\u6027\u8A2D\u70BA\u771F\u5373\u53EF\u8986\u5BEB\u6B64\u8A2D\u5B9A\u3002"}
-
};
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java
index 937e7bc69ea..c586ad2674c 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -33,7 +33,7 @@ import jdk.xml.internal.SecuritySupport;
* @author G. Todd Miller
* @author Erwin Bolwidt
* @author Morten Jorgensen
- * @LastModified: Jul 2022
+ * @LastModified: Nov 2024
*/
public final class ErrorMsg {
@@ -169,8 +169,6 @@ public final class ErrorMsg {
public static final String OUTLINE_ERR_METHOD_TOO_BIG =
"OUTLINE_ERR_METHOD_TOO_BIG";
- public static final String DESERIALIZE_TRANSLET_ERR = "DESERIALIZE_TRANSLET_ERR";
-
public static final String XPATH_LIMIT = "XPATH_LIMIT";
public static final String XPATH_GROUP_LIMIT = "XPATH_GROUP_LIMIT";
public static final String XPATH_OPERATOR_LIMIT = "XPATH_OPERATOR_LIMIT";
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java
index 469d255ebf3..1d7796f7b69 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -30,7 +30,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.NodeTest;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
public abstract class Type implements Constants {
public static final Type Int = new IntType();
@@ -65,10 +65,6 @@ public abstract class Type implements Constants {
return Type.ObjectString;
}
else {
- //
- @SuppressWarnings("removal")
- java.security.AccessControlContext acc = java.security.AccessController.getContext();
- acc.checkPermission(new RuntimePermission("getContextClassLoader"));
return new ObjectType(javaClassName);
}
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java
index b02aad4f2fd..491000e60ff 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -29,13 +29,13 @@ import jdk.xml.internal.SecuritySupport;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
- * @LastModified: Sep 2017
+ * @LastModified: Nov 2024
*/
public final class Util {
private static char filesep;
static {
- String temp = SecuritySupport.getSystemProperty("file.separator", "/");
+ String temp = System.getProperty("file.separator", "/");
filesep = temp.charAt(0);
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java
index e7cbb69ecac..ddfd461ea45 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.text.Collator;
import java.util.Locale;
/**
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
public class NodeSortRecordFactory {
@@ -149,7 +149,6 @@ public class NodeSortRecordFactory {
LinkageError,
IllegalAccessException,
InstantiationException,
- SecurityException,
TransletException {
try {
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java
index bb1e89911eb..f167cf78d5a 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,11 +42,9 @@ import java.lang.module.ModuleFinder;
import java.lang.module.ModuleReader;
import java.lang.module.ModuleReference;
import java.lang.reflect.InvocationTargetException;
-import java.security.AccessController;
import java.security.CodeSigner;
import java.security.CodeSource;
import java.security.PermissionCollection;
-import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
import java.util.Arrays;
import java.util.HashMap;
@@ -60,7 +58,6 @@ import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.URIResolver;
import jdk.xml.internal.JdkConstants;
-import jdk.xml.internal.SecuritySupport;
/**
@@ -68,7 +65,7 @@ import jdk.xml.internal.SecuritySupport;
* @author G. Todd Millerj
* @author Jochen Cordes
* @author Santiago Pericas-Geertsen
- * @LastModified: May 2021
+ * @LastModified: Nov 2024
*/
public final class TemplatesImpl implements Templates, Serializable {
static final long serialVersionUID = 673094361519270707L;
@@ -262,16 +259,6 @@ public final class TemplatesImpl implements Templates, Serializable {
private void readObject(ObjectInputStream is)
throws IOException, ClassNotFoundException
{
- @SuppressWarnings("removal")
- SecurityManager security = System.getSecurityManager();
- if (security != null){
- String temp = SecuritySupport.getSystemProperty(DESERIALIZE_TRANSLET);
- if (temp == null || !(temp.length()==0 || temp.equalsIgnoreCase("true"))) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.DESERIALIZE_TRANSLET_ERR);
- throw new UnsupportedOperationException(err.toString());
- }
- }
-
// We have to read serialized fields first.
ObjectInputStream.GetField gf = is.readFields();
_name = (String)gf.get("_name", null);
@@ -441,10 +428,7 @@ public final class TemplatesImpl implements Templates, Serializable {
Configuration cf = bootLayer.configuration()
.resolve(finder, ModuleFinder.of(), Set.of(mn));
- PrivilegedAction pa = () -> bootLayer.defineModules(cf, name -> loader);
- @SuppressWarnings("removal")
- ModuleLayer layer = AccessController.doPrivileged(pa);
-
+ ModuleLayer layer = bootLayer.defineModules(cf, _ -> loader);
Module m = layer.findModule(mn).get();
assert m.getLayer() == layer;
@@ -463,14 +447,9 @@ public final class TemplatesImpl implements Templates, Serializable {
throw new TransformerConfigurationException(err.toString());
}
- @SuppressWarnings("removal")
TransletClassLoader loader =
- AccessController.doPrivileged(new PrivilegedAction() {
- public TransletClassLoader run() {
- return new TransletClassLoader(ObjectFactory.findClassLoader(),
+ new TransletClassLoader(ObjectFactory.findClassLoader(),
_tfactory.getExternalExtensionsMap());
- }
- });
try {
final int classCount = _bytecodes.length;
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java
index ca52f46daf7..440df5593ea 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -88,7 +88,7 @@ import org.xml.sax.XMLReader;
* @author G. Todd Miller
* @author Morten Jorgensen
* @author Santiago Pericas-Geertsen
- * @LastModified: July 2023
+ * @LastModified: Nov 2024
*/
public class TransformerFactoryImpl
extends SAXTransformerFactory implements SourceLoader
@@ -265,14 +265,7 @@ public class TransformerFactoryImpl
/**
* javax.xml.transform.sax.TransformerFactory implementation.
*/
- @SuppressWarnings("removal")
public TransformerFactoryImpl() {
-
- if (System.getSecurityManager() != null) {
- _isSecureMode = true;
- _isNotSecureProcessing = false;
- }
-
_xmlFeatures = new JdkXmlFeatures(!_isNotSecureProcessing);
_overrideDefaultParser = _xmlFeatures.getFeature(
JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
@@ -1392,7 +1385,7 @@ public class TransformerFactoryImpl
// Find the parent directory of the translet.
String transletParentDir = transletFile.getParent();
if (transletParentDir == null)
- transletParentDir = SecuritySupport.getSystemProperty("user.dir");
+ transletParentDir = System.getProperty("user.dir");
File transletParentFile = new File(transletParentDir);
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java
index a0e0e948f8c..b4dd0ef6b97 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -50,7 +50,7 @@ import org.xml.sax.XMLReader;
*
* Added Catalog Support for URI resolution
*
- * @LastModified: July 2023
+ * @LastModified: Nov 2024
*/
@SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory
public final class Util {
@@ -207,10 +207,6 @@ public final class Util {
"TransformerFactory.newTemplates()");
throw new TransformerConfigurationException(err.toString());
}
- catch (SecurityException e) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.FILE_ACCESS_ERR, systemId);
- throw new TransformerConfigurationException(err.toString());
- }
return input;
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java
index 1fd84e9f639..ac60d679c86 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -83,7 +83,7 @@ import org.w3c.dom.ls.LSSerializer;
* @author Andy Clark, IBM
* @author Ralf Pfeiffer, IBM
* @since PR-DOM-Level-1-19980818.
- * @LastModified: Apr 2022
+ * @LastModified: Nov 2024
*/
public class CoreDocumentImpl
extends ParentNode implements Document {
@@ -306,7 +306,7 @@ public class CoreDocumentImpl
super(null);
ownerDocument = this;
allowGrammarAccess = grammarAccess;
- String systemProp = SecuritySupport.getSystemProperty(Constants.SUN_DOM_PROPERTY_PREFIX+Constants.SUN_DOM_ANCESTOR_CHECCK);
+ String systemProp = System.getProperty(Constants.SUN_DOM_PROPERTY_PREFIX+Constants.SUN_DOM_ANCESTOR_CHECCK);
if (systemProp != null) {
if (systemProp.equalsIgnoreCase("false")) {
ancestorChecking = false;
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
index 455e2b5446f..e6ad6229224 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
@@ -94,7 +94,7 @@ import org.xml.sax.InputSource;
* @author K.Venugopal SUN Microsystems
* @author Neeraj Bajaj SUN Microsystems
* @author Sunitha Reddy SUN Microsystems
- * @LastModified: Feb 2024
+ * @LastModified: Nov 2024
*/
public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
@@ -2010,12 +2010,7 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
// which encoding to use. Leave them for now.
private static synchronized URI getUserDir() throws URI.MalformedURIException {
// get the user.dir property
- String userDir = "";
- try {
- userDir = SecuritySupport.getSystemProperty("user.dir");
- }
- catch (SecurityException se) {
- }
+ String userDir = System.getProperty("user.dir");
// return empty string if property value is empty string.
if (userDir.length() == 0)
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java
index 59504ec0bd4..c3a14f6d82b 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -36,12 +36,12 @@ import jdk.xml.internal.SecuritySupport;
* @author Neeraj Bajaj, Sun Microsystems, inc.
* @author Sandy Gao, IBM
*
- * @LastModified: Apr 2019
+ * @LastModified: Nov 2024
*/
public abstract class TypeValidator {
private static final boolean USE_CODE_POINT_COUNT_FOR_STRING_LENGTH =
- Boolean.parseBoolean(SecuritySupport.getSystemProperty(
+ Boolean.parseBoolean(System.getProperty(
"com.sun.org.apache.xerces.internal.impl.dv.xs.useCodePointCountForStringLength", "false"));
// which facets are allowed for this type
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java
index 1ee1e5225f2..5d469a0c56c 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -39,7 +39,7 @@ import org.xml.sax.SAXNotSupportedException;
/**
* @author Rajiv Mordani
* @author Edwin Goei
- * @LastModified: July 2023
+ * @LastModified: Nov 2024
*/
public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory {
/** These are DocumentBuilderFactory attributes not DOM attributes */
@@ -220,7 +220,6 @@ public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory {
}
}
- @SuppressWarnings("removal")
public void setFeature(String name, boolean value)
throws ParserConfigurationException {
if (features == null) {
@@ -228,11 +227,6 @@ public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory {
}
// If this is the secure processing feature, save it then return.
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
- if (System.getSecurityManager() != null && (!value)) {
- throw new ParserConfigurationException(
- SAXMessageFormatter.formatMessage(null,
- "jaxp-secureprocessing-feature", null));
- }
fSecureProcess = value;
fSecurityManager.setSecureProcessing(fSecureProcess);
features.put(name, value ? Boolean.TRUE : Boolean.FALSE);
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java
index 5086dab2669..c8b5a7c99b0 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -43,7 +43,7 @@ import org.xml.sax.SAXNotSupportedException;
* @author Rajiv Mordani
* @author Edwin Goei
*
- * @LastModified: July 2023
+ * @LastModified: Nov 2024
*/
public class SAXParserFactoryImpl extends SAXParserFactory {
@@ -116,7 +116,6 @@ public class SAXParserFactoryImpl extends SAXParserFactory {
* Sets the particular feature in the underlying implementation of
* org.xml.sax.XMLReader.
*/
- @SuppressWarnings("removal")
public void setFeature(String name, boolean value)
throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException {
@@ -125,11 +124,6 @@ public class SAXParserFactoryImpl extends SAXParserFactory {
}
// If this is the secure processing feature, save it then return.
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
- if (System.getSecurityManager() != null && (!value)) {
- throw new ParserConfigurationException(
- SAXMessageFormatter.formatMessage(null,
- "jaxp-secureprocessing-feature", null));
- }
fSecureProcess = value;
fSecurityManager.setSecureProcessing(fSecureProcess);
putInFeatures(name, value);
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java
index fbb758def47..0569961013f 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -190,7 +190,7 @@ import jdk.xml.internal.SecuritySupport;
* @author Sunitha Reddy
* @see javax.xml.datatype.Duration
* @since 1.5
- * @LastModified: Aug 2020
+ * @LastModified: Nov 2024
*/
public class XMLGregorianCalendarImpl
@@ -2418,9 +2418,9 @@ public class XMLGregorianCalendarImpl
*/
private Locale getDefaultLocale() {
- String lang = SecuritySupport.getSystemProperty("user.language.format");
- String country = SecuritySupport.getSystemProperty("user.country.format");
- String variant = SecuritySupport.getSystemProperty("user.variant.format");
+ String lang = System.getProperty("user.language.format");
+ String country = System.getProperty("user.country.format");
+ String variant = System.getProperty("user.variant.format");
Locale locale = null;
if (lang != null) {
if (country != null) {
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java
index f36d2bd14bb..16c07fabbcd 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -70,7 +70,7 @@ import org.xml.sax.SAXParseException;
*
* @author Kohsuke Kawaguchi
*
- * @LastModified: July 2023
+ * @LastModified: Nov 2024
*/
public final class XMLSchemaFactory extends SchemaFactory {
@@ -423,7 +423,7 @@ public final class XMLSchemaFactory extends SchemaFactory {
}
}
- @SuppressWarnings({"removal","deprecation"})
+ @SuppressWarnings("deprecation")
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -441,12 +441,6 @@ public final class XMLSchemaFactory extends SchemaFactory {
}
}
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
- if (System.getSecurityManager() != null && (!value)) {
- throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(null,
- "jaxp-secureprocessing-feature", null));
- }
-
fSecurityManager.setSecureProcessing(value);
if (value) {
fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD,
@@ -464,8 +458,7 @@ public final class XMLSchemaFactory extends SchemaFactory {
}
else if (name.equals(JdkConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
//in secure mode, let useServicesMechanism be determined by the constructor
- if (System.getSecurityManager() != null)
- return;
+ return;
}
if ((fXmlFeatures != null) &&
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java
index 179afcaeb31..7644127a60d 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -57,7 +57,7 @@ import org.xml.sax.ErrorHandler;
*
An implementation of XMLComponentManager for a schema validator.
*
* @author Michael Glavassevich, IBM
- * @LastModified: July 2023
+ * @LastModified: Nov 2024
*/
final class XMLSchemaValidatorComponentManager extends ParserConfigurationSettings implements
XMLComponentManager {
@@ -230,7 +230,6 @@ final class XMLSchemaValidatorComponentManager extends ParserConfigurationSettin
private Locale fLocale = null;
/** Constructs a component manager suitable for Xerces' schema validator. */
- @SuppressWarnings("removal")
public XMLSchemaValidatorComponentManager(XSGrammarPoolContainer grammarContainer) {
// setup components
fEntityManager = new XMLEntityManager();
@@ -293,11 +292,6 @@ final class XMLSchemaValidatorComponentManager extends ParserConfigurationSettin
fFeatures.put(UNPARSED_ENTITY_CHECKING, Boolean.TRUE);
boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING);
- if (System.getSecurityManager() != null) {
- _isSecureMode = true;
- secureProcessing = true;
- }
-
fInitSecurityManager = (XMLSecurityManager)
grammarContainer.getProperty(SECURITY_MANAGER);
if (fInitSecurityManager != null ) {
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java
index aaddf407288..2d06f6e7e8e 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -35,7 +35,7 @@ import jdk.xml.internal.SecuritySupport;
* when bundled as part of the JDK.
*
*
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
public final class ObjectFactory {
@@ -55,13 +55,9 @@ public final class ObjectFactory {
/** Returns true if debug has been enabled. */
private static boolean isDebugEnabled() {
- try {
- String val = SecuritySupport.getSystemProperty("xerces.debug");
- // Allow simply setting the prop to turn on debug
- return (val != null && (!"false".equals(val)));
- }
- catch (SecurityException se) {}
- return false;
+ String val = System.getProperty("xerces.debug");
+ // Allow simply setting the prop to turn on debug
+ return (val != null && (!"false".equals(val)));
} // isDebugEnabled()
/** Prints a message to standard error if debugging is enabled. */
@@ -75,14 +71,9 @@ public final class ObjectFactory {
* Figure out which ClassLoader to use. For JDK 1.2 and later use
* the context ClassLoader.
*/
- @SuppressWarnings("removal")
public static ClassLoader findClassLoader()
throws ConfigurationError
{
- if (System.getSecurityManager()!=null) {
- //this will ensure bootclassloader is used
- return null;
- }
// Figure out which ClassLoader to use for loading the provider
// class. If there is a Context ClassLoader then use it.
ClassLoader context = SecuritySupport.getContextClassLoader();
@@ -138,16 +129,10 @@ public final class ObjectFactory {
* Create an instance of a class using the same classloader for the ObjectFactory by default
* or bootclassloader when Security Manager is in place
*/
- @SuppressWarnings("removal")
public static Object newInstance(String className, boolean doFallback)
throws ConfigurationError
{
- if (System.getSecurityManager()!=null) {
- return newInstance(className, null, doFallback);
- } else {
- return newInstance(className,
- findClassLoader (), doFallback);
- }
+ return newInstance(className, findClassLoader (), doFallback);
}
/**
@@ -191,21 +176,6 @@ public final class ObjectFactory {
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
{
- //throw security exception if the calling thread is not allowed to access the package
- //restrict the access to package as speicified in java.security policy
- @SuppressWarnings("removal")
- SecurityManager security = System.getSecurityManager();
- if (security != null) {
- if (className.startsWith(JAXP_INTERNAL) ||
- className.startsWith(STAX_INTERNAL)) {
- cl = null;
- } else {
- final int lastDot = className.lastIndexOf(".");
- String packageName = className;
- if (lastDot != -1) packageName = className.substring(0, lastDot);
- security.checkPackageAccess(packageName);
- }
- }
Class> providerClass;
if (cl == null) {
//use the bootstrap ClassLoader.
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java
index d89072fe277..2b1e1411f5f 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -224,7 +224,7 @@ public final class XMLSecurityPropertyManager {
*/
private void getSystemProperty(Property property, String systemProperty) {
try {
- String value = SecuritySupport.getSystemProperty(systemProperty);
+ String value = System.getProperty(systemProperty);
if (value != null) {
values[property.ordinal()] = value;
states[property.ordinal()] = State.SYSTEMPROPERTY;
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java
index f619b32fac5..17dcac31250 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,7 +42,7 @@ import jdk.xml.internal.SecuritySupport;
* {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
* by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
*
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
@Deprecated
public abstract class SerializerFactory
@@ -74,7 +74,7 @@ public abstract class SerializerFactory
factory = new SerializerFactoryImpl( Method.TEXT );
registerSerializerFactory( factory );
- list = SecuritySupport.getSystemProperty( FactoriesProperty );
+ list = System.getProperty( FactoriesProperty );
if ( list != null ) {
token = new StringTokenizer( list, " ;,:" );
while ( token.hasMoreTokens() ) {
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java
index a88606d5085..a4792795a58 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -48,7 +48,7 @@ import jdk.xml.internal.SecuritySupport;
* for each encoding.
*
* @author Assaf Arkin
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
public final class Encodings extends Object
@@ -229,41 +229,33 @@ public final class Encodings extends Object
if (null == encoding)
{
- try
+ // Get the default system character encoding. This may be
+ // incorrect if they passed in a writer, but right now there
+ // seems to be no way to get the encoding from a writer.
+ encoding = System.getProperty("file.encoding", "UTF8");
+
+ if (null != encoding)
{
- // Get the default system character encoding. This may be
- // incorrect if they passed in a writer, but right now there
- // seems to be no way to get the encoding from a writer.
- encoding = SecuritySupport.getSystemProperty("file.encoding", "UTF8");
+ /*
+ * See if the mime type is equal to UTF8. If you don't
+ * do that, then convertJava2MimeEncoding will convert
+ * 8859_1 to "ISO-8859-1", which is not what we want,
+ * I think, and I don't think I want to alter the tables
+ * to convert everything to UTF-8.
+ */
+ String jencoding =
+ (encoding.equalsIgnoreCase("Cp1252")
+ || encoding.equalsIgnoreCase("ISO8859_1")
+ || encoding.equalsIgnoreCase("8859_1")
+ || encoding.equalsIgnoreCase("UTF8"))
+ ? DEFAULT_MIME_ENCODING
+ : convertJava2MimeEncoding(encoding);
- if (null != encoding)
- {
-
- /*
- * See if the mime type is equal to UTF8. If you don't
- * do that, then convertJava2MimeEncoding will convert
- * 8859_1 to "ISO-8859-1", which is not what we want,
- * I think, and I don't think I want to alter the tables
- * to convert everything to UTF-8.
- */
- String jencoding =
- (encoding.equalsIgnoreCase("Cp1252")
- || encoding.equalsIgnoreCase("ISO8859_1")
- || encoding.equalsIgnoreCase("8859_1")
- || encoding.equalsIgnoreCase("UTF8"))
- ? DEFAULT_MIME_ENCODING
- : convertJava2MimeEncoding(encoding);
-
- encoding =
- (null != jencoding) ? jencoding : DEFAULT_MIME_ENCODING;
- }
- else
- {
- encoding = DEFAULT_MIME_ENCODING;
- }
+ encoding =
+ (null != jencoding) ? jencoding : DEFAULT_MIME_ENCODING;
}
- catch (SecurityException se)
+ else
{
encoding = DEFAULT_MIME_ENCODING;
}
@@ -329,11 +321,7 @@ public final class Encodings extends Object
String urlString = null;
InputStream is = null;
- try {
- urlString = SecuritySupport.getSystemProperty(ENCODINGS_PROP, "");
- } catch (SecurityException e) {
- }
-
+ urlString = System.getProperty(ENCODINGS_PROP, "");
if (urlString != null && urlString.length() > 0) {
@SuppressWarnings("deprecation")
URL url = new URL(urlString);
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java
index 9bd16cb86d7..5be3d6a6d76 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -70,7 +70,7 @@ import jdk.xml.internal.SecuritySupport;
* @see SerializerFactory
* @see Method
* @see Serializer
- * @LastModified: May 2021
+ * @LastModified: Nov 2024
*/
public final class OutputPropertiesFactory
{
@@ -354,7 +354,7 @@ public final class OutputPropertiesFactory
for (int i = 0; i < keys.length; i++) {
// check System Property. This is kept as is for binary compatibility
- String sys = SecuritySupport.getSystemProperty(keys[i]);
+ String sys = System.getProperty(keys[i]);
props.put(keys[i], (sys == null) ? values[i] : sys);
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java
index fa4e0c90126..ba8c75439e3 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,7 +42,7 @@ import com.sun.org.apache.xml.internal.serializer.utils.URI.MalformedURIExceptio
*
* @xsl.usage internal
*
- * @LastModified: Jan 2022
+ * @LastModified: Nov 2024
*/
public final class SystemIDResolver
{
@@ -52,8 +52,7 @@ public final class SystemIDResolver
*
*
The relative URI is a local filesystem path. The path can be
* absolute or relative. If it is a relative path, it is resolved relative
- * to the system property "user.dir" if it is available; if not (i.e. in an
- * Applet perhaps which throws SecurityException) then we just return the
+ * to the system property "user.dir" if it is available; if not then we just return the
* relative path. The space and backslash characters are also replaced to
* generate a good absolute URI.
*
@@ -71,15 +70,7 @@ public final class SystemIDResolver
String absolutePath = localPath;
if (!isAbsolutePath(localPath))
{
- try
- {
absolutePath = getAbsolutePathFromRelativePath(localPath);
- }
- // user.dir not accessible from applet
- catch (SecurityException se)
- {
- return "file:" + localPath;
- }
}
String urlString;
@@ -244,14 +235,9 @@ public final class SystemIDResolver
if (secondColonIndex > 0)
{
String localPath = systemId.substring(secondColonIndex-1);
- try {
- if (!isAbsolutePath(localPath))
- absoluteURI = systemId.substring(0, secondColonIndex-1) +
+ if (!isAbsolutePath(localPath))
+ absoluteURI = systemId.substring(0, secondColonIndex-1) +
getAbsolutePathFromRelativePath(localPath);
- }
- catch (SecurityException se) {
- return systemId;
- }
}
}
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java
index c6897b0fc0d..9b1fa9c25d5 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.List;
/**
* Pool of object of a given type to pick from to help memory usage
* @xsl.usage internal
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
public class ObjectPool implements java.io.Serializable
{
@@ -138,7 +138,7 @@ public class ObjectPool implements java.io.Serializable
{
return objectType.getConstructor().newInstance();
}
- catch (InstantiationException | IllegalAccessException | SecurityException |
+ catch (InstantiationException | IllegalAccessException |
IllegalArgumentException | InvocationTargetException | NoSuchMethodException ex){}
// Throw unchecked exception for error in pool configuration.
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java
index caf2a4b1ba7..8b1cbfe8279 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -35,7 +35,7 @@ import com.sun.org.apache.xml.internal.utils.URI.MalformedURIException;
* see code comments for details on how resolution is performed.
* @xsl.usage internal
*
- * @LastModified: Sept 2021
+ * @LastModified: Nov 2024
*/
public class SystemIDResolver
{
@@ -45,8 +45,7 @@ public class SystemIDResolver
*
*
The relative URI is a local filesystem path. The path can be
* absolute or relative. If it is a relative path, it is resolved relative
- * to the system property "user.dir" if it is available; if not (i.e. in an
- * Applet perhaps which throws SecurityException) then we just return the
+ * to the system property "user.dir" if it is available; if not then we just return the
* relative path. The space and backslash characters are also replaced to
* generate a good absolute URI.
*
@@ -64,15 +63,7 @@ public class SystemIDResolver
String absolutePath = localPath;
if (!isAbsolutePath(localPath))
{
- try
- {
absolutePath = getAbsolutePathFromRelativePath(localPath);
- }
- // user.dir not accessible from applet
- catch (SecurityException se)
- {
- return "file:" + localPath;
- }
}
String urlString;
@@ -237,14 +228,9 @@ public class SystemIDResolver
if (secondColonIndex > 0)
{
String localPath = systemId.substring(secondColonIndex-1);
- try {
- if (!isAbsolutePath(localPath))
- absoluteURI = systemId.substring(0, secondColonIndex-1) +
- getAbsolutePathFromRelativePath(localPath);
- }
- catch (SecurityException se) {
- return systemId;
- }
+ if (!isAbsolutePath(localPath))
+ absoluteURI = systemId.substring(0, secondColonIndex-1) +
+ getAbsolutePathFromRelativePath(localPath);
}
}
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java
index d1ab24859fa..91a6597a603 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -37,7 +37,7 @@ import org.xml.sax.XMLReader;
* Creates XMLReader objects and caches them for re-use.
* This class follows the singleton pattern.
*
- * @LastModified: July 2023
+ * @LastModified: Nov 2024
*/
public class XMLReaderManager {
@@ -118,7 +118,7 @@ public class XMLReaderManager {
ReaderWrapper rw = m_readers.get();
boolean threadHasReader = (rw != null);
reader = threadHasReader ? rw.reader : null;
- String factory = SecuritySupport.getSystemProperty(property);
+ String factory = System.getProperty(property);
if (threadHasReader && m_inUse.get(reader) != Boolean.TRUE &&
(rw.overrideDefaultParser == m_overrideDefaultParser) &&
( factory == null || reader.getClass().getName().equals(factory))) {
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java
index def8cec86ce..90fabdc0f58 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java
@@ -21,12 +21,7 @@
package com.sun.org.apache.xml.internal.utils.res;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
/**
* The default (english) resource bundle.
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java
index 532d1cf6299..326c40f4355 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/**
* Licensed to the Apache Software Foundation (ASF) under one
@@ -31,7 +31,7 @@ import javax.xml.transform.TransformerException;
/**
* The function table for XPath.
*
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2024
*/
public class FunctionTable
{
@@ -348,7 +348,7 @@ public class FunctionTable
Class> c = m_functions_customer[which-NUM_BUILT_IN_FUNCS];
return (Function) c.getConstructor().newInstance();
}
- }catch (InstantiationException | IllegalAccessException | SecurityException |
+ }catch (InstantiationException | IllegalAccessException |
IllegalArgumentException | InvocationTargetException | NoSuchMethodException ex){
throw new TransformerException(ex.getMessage());
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java
index 819faa61b9c..0beccb5132b 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,7 +32,7 @@ import jdk.xml.internal.SecuritySupport;
/**
* Execute the SystemProperty() function.
* @xsl.usage advanced
- * @LastModified: Sep 2017
+ * @LastModified: Nov 2024
*/
public class FuncSystemProperty extends FunctionOneArg
{
@@ -96,44 +96,21 @@ public class FuncSystemProperty extends FunctionOneArg
new Object[]{ namespace,
fullName }); //"Don't currently do anything with namespace "+namespace+" in property: "+fullName);
- try
+ result = System.getProperty(propName);
+ if (null == result)
{
- result = SecuritySupport.getSystemProperty(propName);
-
- if (null == result)
- {
-
- // result = System.getenv(propName);
- return XString.EMPTYSTRING;
- }
- }
- catch (SecurityException se)
- {
- warn(xctxt, XPATHErrorResources.WG_SECURITY_EXCEPTION,
- new Object[]{ fullName }); //"SecurityException when trying to access XSL system property: "+fullName);
-
+ // result = System.getenv(propName);
return XString.EMPTYSTRING;
}
}
}
else
{
- try
+ result = System.getProperty(fullName);
+
+ if (null == result)
{
- result = SecuritySupport.getSystemProperty(fullName);
-
- if (null == result)
- {
-
- // result = System.getenv(fullName);
- return XString.EMPTYSTRING;
- }
- }
- catch (SecurityException se)
- {
- warn(xctxt, XPATHErrorResources.WG_SECURITY_EXCEPTION,
- new Object[]{ fullName }); //"SecurityException when trying to access XSL system property: "+fullName);
-
+ // result = System.getenv(fullName);
return XString.EMPTYSTRING;
}
}
@@ -163,7 +140,6 @@ public class FuncSystemProperty extends FunctionOneArg
{
try
{
- // Use SecuritySupport class to provide privileged access to property file
try (InputStream is = SecuritySupport.getResourceAsStream(XSLT_PROPERTIES)) {
target.load(is); // and load up the property bag from this
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java
index aa1e37ea6b3..7c5269f9d12 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -37,7 +37,7 @@ import jdk.xml.internal.XMLSecurityManager;
*
* @author Ramesh Mandava
*
- * @LastModified: Jan 2022
+ * @LastModified: Nov 2024
*/
public class XPathFactoryImpl extends XPathFactory {
@@ -78,12 +78,7 @@ public class XPathFactoryImpl extends XPathFactory {
/**
* javax.xml.xpath.XPathFactory implementation.
*/
- @SuppressWarnings("removal")
public XPathFactoryImpl() {
- if (System.getSecurityManager() != null) {
- _isSecureMode = true;
- _isNotSecureProcessing = false;
- }
_featureManager = new JdkXmlFeatures(!_isNotSecureProcessing);
_xmlSecMgr = new XMLSecurityManager(true);
}
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java
index eaa02c98798..433a0f85389 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: Jul 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources extends ListResourceBundle
{
@@ -337,7 +337,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -882,9 +881,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"Do not currently do anything with namespace {0} in property: {1}"},
- { WG_SECURITY_EXCEPTION,
- "SecurityException when trying to access XSL system property: {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"Old syntax: quo(...) is no longer defined in XPath."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java
index eed36ae9d7a..272dca058d3 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: Jul 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_de extends ListResourceBundle
{
@@ -337,7 +337,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -880,9 +879,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"Derzeit keine Aktion mit Namespace {0} in Eigenschaft {1} ausf\u00FChren"},
- { WG_SECURITY_EXCEPTION,
- "SecurityException beim Versuch, auf XSL-Systemeigenschaft {0} zuzugreifen"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"Alte Syntax: quo(...) nicht mehr definiert in XPath."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java
index faa87ab77c7..859983ca6dd 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: May 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_es extends ListResourceBundle
{
@@ -326,7 +326,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -839,9 +838,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"No realice ninguna acci\u00F3n con el espacio de nombres {0} en la propiedad: {1}"},
- { WG_SECURITY_EXCEPTION,
- "Excepci\u00F3n de seguridad al intentar acceder a la propiedad del sistema XSL: {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"Sintaxis anterior: quo(...) ya no se define en XPath."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java
index 4f17799a935..d9ddcf8212a 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: May 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_fr extends ListResourceBundle
{
@@ -326,7 +326,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -839,9 +838,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"Espace de noms {0} inexploitable dans la propri\u00E9t\u00E9 : {1}"},
- { WG_SECURITY_EXCEPTION,
- "Exception SecurityException g\u00E9n\u00E9r\u00E9e lors de la tentative d''acc\u00E8s \u00E0 la propri\u00E9t\u00E9 syst\u00E8me XSL : {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"L'ancienne syntaxe quo(...) n'est plus d\u00E9finie dans XPath."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java
index a1bb1f43fbb..ad730f9894f 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: May 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_it extends ListResourceBundle
{
@@ -326,7 +326,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -839,9 +838,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"Non effettuare alcuna operazione sullo spazio di nomi {0} nella propriet\u00E0: {1}"},
- { WG_SECURITY_EXCEPTION,
- "SecurityException nel tentativo di accedere alla propriet\u00E0 di sistema XSL {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"Sintassi obsoleta: quo(...) non \u00E8 pi\u00F9 definito nell'XPath."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java
index 7347a22f8e9..1b707cd7820 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: Jul 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_ja extends ListResourceBundle
{
@@ -337,7 +337,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -880,9 +879,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"\u30D7\u30ED\u30D1\u30C6\u30A3{1}\u5185\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9{0}\u3067\u306F\u73FE\u5728\u4F55\u3082\u5B9F\u884C\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044"},
- { WG_SECURITY_EXCEPTION,
- "XSL\u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306BSecurityException\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"\u53E4\u3044\u69CB\u6587: quo(...)\u306FXPath\u3067\u306F\u73FE\u5728\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java
index 2b2f4f811ff..01e0f4062ed 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: May 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_ko extends ListResourceBundle
{
@@ -326,7 +326,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -839,9 +838,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"\uC18D\uC131\uC758 {0} \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uB300\uD574 \uD604\uC7AC \uC5B4\uB5A4 \uC791\uC5C5\uB3C4 \uC218\uD589\uD558\uC9C0 \uC54A\uC544\uC57C \uD568: {1}"},
- { WG_SECURITY_EXCEPTION,
- "XSL \uC2DC\uC2A4\uD15C \uC18D\uC131\uC5D0 \uC561\uC138\uC2A4\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 SecurityException \uBC1C\uC0DD: {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"\uC774\uC804 \uAD6C\uBB38: quo(...)\uAC00 XPath\uC5D0 \uB354 \uC774\uC0C1 \uC815\uC758\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java
index 4a8226142fa..ee9e50cf644 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: May 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_pt_BR extends ListResourceBundle
{
@@ -326,7 +326,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -839,9 +838,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"Nenhuma a\u00E7\u00E3o a ser tomada com o namespace {0} na propriedade: {1}"},
- { WG_SECURITY_EXCEPTION,
- "SecurityException ao tentar acessar a propriedade de sistema XSL: {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"Sintaxe antiga: quo(...) n\u00E3o est\u00E1 mais definido no XPath."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java
index 61585bda1c3..c0acf167b9d 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: May 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_sv extends ListResourceBundle
{
@@ -326,7 +326,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -839,9 +838,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"G\u00F6r f\u00F6r n\u00E4rvarande inte n\u00E5gonting med namnrymden {0} i egenskap: {1}"},
- { WG_SECURITY_EXCEPTION,
- "SecurityException vid f\u00F6rs\u00F6k att f\u00E5 \u00E5tkomst till XSL-systemegenskap: {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"Gammal syntax: quo(...) definieras inte l\u00E4ngre i XPath."},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java
index 511fb6ad768..dd9e507a8f0 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: Jul 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_zh_CN extends ListResourceBundle
{
@@ -337,7 +337,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -880,9 +879,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"\u76EE\u524D\u4E0D\u8981\u4F7F\u7528\u5C5E\u6027{1}\u4E2D\u7684\u540D\u79F0\u7A7A\u95F4{0}\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C"},
- { WG_SECURITY_EXCEPTION,
- "\u5C1D\u8BD5\u8BBF\u95EE XSL \u7CFB\u7EDF\u5C5E\u6027\u65F6\u51FA\u73B0 SecurityException: {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"\u65E7\u8BED\u6CD5: XPath \u4E2D\u4E0D\u518D\u5B9A\u4E49 quo(...)\u3002"},
diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java
index d962d6b0c8c..edfb20a0920 100644
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,7 @@ import java.util.ListResourceBundle;
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
- * @LastModified: May 2022
+ * @LastModified: Nov 2024
*/
public class XPATHErrorResources_zh_TW extends ListResourceBundle
{
@@ -326,7 +326,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
"WG_PROPERTY_NOT_SUPPORTED";
public static final String WG_DONT_DO_ANYTHING_WITH_NS =
"WG_DONT_DO_ANYTHING_WITH_NS";
- public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
public static final String WG_QUO_NO_LONGER_DEFINED =
"WG_QUO_NO_LONGER_DEFINED";
public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
@@ -839,9 +838,6 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
{ WG_DONT_DO_ANYTHING_WITH_NS,
"\u76EE\u524D\u4E0D\u6703\u8655\u7406\u5C6C\u6027\u4E2D\u7684\u547D\u540D\u7A7A\u9593 {0}: {1}"},
- { WG_SECURITY_EXCEPTION,
- "\u5617\u8A66\u5B58\u53D6 XSL \u7CFB\u7D71\u5C6C\u6027\u6642\u767C\u751F SecurityException: {0}"},
-
{ WG_QUO_NO_LONGER_DEFINED,
"\u820A\u8A9E\u6CD5: XPath \u4E2D\u4E0D\u518D\u5B9A\u7FA9 quo(...)\u3002"},
diff --git a/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityStorage.java b/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityStorage.java
index 3f1fb40f73f..2befe055739 100644
--- a/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityStorage.java
+++ b/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityStorage.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -404,12 +404,7 @@ public class XMLEntityStorage {
// which encoding to use. Leave them for now.
private static synchronized String getUserDir() {
// get the user.dir property
- String userDir = "";
- try {
- userDir = SecuritySupport.getSystemProperty("user.dir");
- }
- catch (SecurityException se) {
- }
+ String userDir = System.getProperty("user.dir");
// return empty string if property value is empty string.
if (userDir.length() == 0)
diff --git a/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/WriterUtility.java b/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/WriterUtility.java
index 47f85159c1c..75b930d0537 100644
--- a/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/WriterUtility.java
+++ b/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/WriterUtility.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -240,7 +240,7 @@ public class WriterUtility {
private CharsetEncoder getDefaultEncoder(){
try{
- String encoding = SecuritySupport.getSystemProperty("file.encoding");
+ String encoding = System.getProperty("file.encoding");
if(encoding != null){
return Charset.forName(encoding).newEncoder();
}
diff --git a/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java b/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java
index 3dbe4b24536..05c974b54bf 100644
--- a/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java
+++ b/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -339,7 +339,7 @@ public final class XMLStreamWriterImpl extends AbstractMap