jenkinsci / ontrack-plugin

ontrack plug-in for Jenkins
https://plugins.jenkins.io/ontrack/
MIT License
9 stars 6 forks source link

Fix ClassCastException in OntrackMultiChoiceParameter #43

Closed DavidCADanneels closed 6 years ago

DavidCADanneels commented 6 years ago

If the OntrackMultiChoiceParameter displays only one option, we get a ClassCastException, because this option is passed as a single Boolean, while we expected a JSONArray of Booleans.

With this fix we first verify the object type and handle it differently in case of a Boolean. This has been tested ok locally.

DavidCADanneels commented 6 years ago

The if clause has been updated and tested locally

dcoraboeuf commented 6 years ago

Fixed in 2.30.3.8