Skip to content

Commit

Permalink
[FIXED JENKINS-13197] Saving job config with managed script builder c…
Browse files Browse the repository at this point in the history
…auses json error
  • Loading branch information
imod committed Mar 24, 2012
1 parent b22d541 commit acc8050
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -297,8 +297,8 @@ public ScriptBuildStep newInstance(StaplerRequest req, JSONObject json) {
logger.log(Level.FINE, json.toString(2));

String id = json.getString("buildStepId");
final JSONObject definedArgs = json.getJSONObject("defineArgs");
if (!definedArgs.isNullObject()) {
final JSONObject definedArgs = json.optJSONObject("defineArgs");
if (definedArgs != null && !definedArgs.isNullObject()) {
JSONObject argsObj = definedArgs.optJSONObject("buildStepArgs");
if (argsObj == null) {
JSONArray argsArrayObj = definedArgs.optJSONArray("buildStepArgs");
Expand Down

0 comments on commit acc8050

Please sign in to comment.