[java-opensaml] 01/01: JSPT-95 use non deprecated EvaluableScript constructors

Rod Widdowson rdw at steadingsoftware.com
Sat Apr 25 10:46:47 EDT 2020


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch dev/JSPT-95
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=22d7f96047399290f7c07e568a99f131e1cbe4d4

commit 22d7f96047399290f7c07e568a99f131e1cbe4d4
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sat Mar 28 16:45:08 2020 +0000

    JSPT-95 use non deprecated EvaluableScript constructors
    
    https://issues.shibboleth.net/jira/browse/JSPT-95
---
 opensaml-parent/pom.xml                                      |  2 +-
 .../resolver/filter/impl/ScriptedTrustedNamesFunction.java   | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/opensaml-parent/pom.xml b/opensaml-parent/pom.xml
index 9fa7675..ba03b20 100644
--- a/opensaml-parent/pom.xml
+++ b/opensaml-parent/pom.xml
@@ -49,7 +49,7 @@
     </modules>
 
     <properties>
-        <java-support.version>8.0.0</java-support.version>
+        <java-support.version>8.0.1-SNAPSHOT</java-support.version>
         <spring-extensions.version>6.0.0</spring-extensions.version>
         <checkstyle.configLocation>${project.basedir}/../opensaml-parent/resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
         <opensaml-parent.site.url>${shibboleth.site.url}java-opensaml/${project.version}/</opensaml-parent.site.url>
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedTrustedNamesFunction.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedTrustedNamesFunction.java
index 9dd5561..640dccc 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedTrustedNamesFunction.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedTrustedNamesFunction.java
@@ -91,10 +91,14 @@ public class ScriptedTrustedNamesFunction extends AbstractScriptEvaluator implem
      * @throws ScriptException if the compile fails
      * @throws IOException if the file doesn't exist.
      */
+    @SuppressWarnings("removal")
     @Nonnull static ScriptedTrustedNamesFunction resourceScript(@Nonnull @NotEmpty final String engineName,
             @Nonnull final Resource resource) throws ScriptException, IOException {
         try (final InputStream is = resource.getInputStream()) {
-            final EvaluableScript script = new EvaluableScript(engineName, is);
+            final EvaluableScript script = new EvaluableScript();
+            script.setEngineName(engineName);
+            script.setScript(is);
+            script.initializeWithScriptException();
             return new ScriptedTrustedNamesFunction(script, resource.getDescription());
         }
     }
@@ -120,9 +124,13 @@ public class ScriptedTrustedNamesFunction extends AbstractScriptEvaluator implem
      * @return the function
      * @throws ScriptException if the compile fails
      */
+    @SuppressWarnings("removal")
     @Nonnull static ScriptedTrustedNamesFunction inlineScript(@Nonnull @NotEmpty final String engineName,
             @Nonnull @NotEmpty final String scriptSource) throws ScriptException {
-        final EvaluableScript script = new EvaluableScript(engineName, scriptSource);
+        final EvaluableScript script = new EvaluableScript();
+        script.setEngineName(engineName);
+        script.setScript(scriptSource);
+        script.initializeWithScriptException();
         return new ScriptedTrustedNamesFunction(script, "Inline");
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list