Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Being defensive.
  • Loading branch information
kohsuke committed Apr 1, 2014
1 parent 1b65fbb commit 5f06dfe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/util/spring/BeanBuilder.java
Expand Up @@ -125,6 +125,8 @@ public void parse(InputStream script) {
* Parses the bean definition groovy script by first exporting the given {@link Binding}.
*/
public void parse(InputStream script, Binding binding) {
if (script==null)
throw new IllegalArgumentException("No script is provided");
setBinding(binding);
CompilerConfiguration cc = new CompilerConfiguration();
cc.setScriptBaseClass(ClosureScript.class.getName());
Expand Down

0 comments on commit 5f06dfe

Please sign in to comment.