-
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.