[java-opensaml] branch master updated: JSPT-95 use non deprecated EvaluableScript constructors
Rod Widdowson
rdw at steadingsoftware.com
Wed Jun 10 14:27:21 UTC 2020
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=a14c2326a7bb5648f9897633deaed90af282c507
The following commit(s) were added to refs/heads/master by this push:
new a14c2326a JSPT-95 use non deprecated EvaluableScript constructors
a14c2326a is described below
commit a14c2326a7bb5648f9897633deaed90af282c507
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
---
.../resolver/filter/impl/ScriptedTrustedNamesFunction.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
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 9dd55612b..640dccc7a 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