-
Bug
-
Resolution: Fixed
-
Major
-
1.532.2 RC
A user with a dashboard view in a folder containing a hudson.plugins.checkstyle.dashboard.WarningsTablePortlet reports an exception in the log:
hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: it.getWarnings(jobs, 'LOW') in /job/.../view/dashboard/. Reason: java.lang.ClassCastException: com.cloudbees.hudson.plugins.folder.Folder cannot be cast to hudson.model.Job java.lang.ClassCastException: com.cloudbees.hudson.plugins.folder.Folder cannot be cast to hudson.model.Job at hudson.plugins.analysis.dashboard.AbstractWarningsTablePortlet.getWarnings(AbstractWarningsTablePortlet.java:151)
AbstractWarningsTablePortlet/portlet.jelly seems to assume, reasonably enough, that ${jobs} is in fact a Collection<Job<?,?>>; yet it is getting at least one Folder in there. The culprit seems to be DashboardPortlet/index.jelly which defines ${jobs} as a synonym for ${items}, which looks wrong.
Code changed in jenkins
User: Jesse Glick
Path:
src/main/resources/hudson/plugins/view/dashboard/DashboardPortlet/index.jelly
http://jenkins-ci.org/commit/dashboard-view-plugin/baa8c5043072c6cc7a3cf44f002d55befd86f1c5
Log:
[FIXED JENKINS-21578] Ensure that ${jobs} is really a Collection<Job>, with no Folder for example.