8071588: The spec for javax.script.ScriptEngineFactory.getProgram() should specify NPEs thrown
Reviewed-by: alanb, hannesw
This commit is contained in:
parent
5f4ad59aee
commit
093753dee1
@ -129,10 +129,11 @@ public final class NashornScriptEngineFactory implements ScriptEngineFactory {
|
||||
|
||||
@Override
|
||||
public String getProgram(final String... statements) {
|
||||
Objects.requireNonNull(statements);
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
|
||||
for (final String statement : statements) {
|
||||
sb.append(statement).append(';');
|
||||
sb.append(Objects.requireNonNull(statement)).append(';');
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
|
Loading…
Reference in New Issue
Block a user