Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/junit-plugin
  Commit: efd067dd3958cb30f4855099a5dc229dd5c34d2c
      
https://github.com/jenkinsci/junit-plugin/commit/efd067dd3958cb30f4855099a5dc229dd5c34d2c
  Author: mwoodland <mark.woodla...@googlemail.com>
  Date:   2017-10-19 (Thu, 19 Oct 2017)

  Changed paths:
    M src/main/java/hudson/tasks/test/AbstractTestResultAction.java

  Log Message:
  -----------
  Prevent unsafe cast to TestResult.

There are already null checks in TestResult.getPreviousResult() that calls 
AbstractRestResultAction.findCorrespondingResult() so presumably it's safe to 
return null here if the results aren't available.

The jenkins cucumber test result plugin 
(https://wiki.jenkins.io/display/JENKINS/Cucumber+Test+Result+Plugin) was 
getting a ClassCastException. This was being caused after having just installed 
the plugin and trying to call the json api as it was trying to get results from 
a previous build from before the plugin was installed:

Caused by: java.lang.ClassCastException: 
hudson.tasks.test.AggregatedTestResultAction$1 cannot be cast to 
hudson.tasks.test.TestResult
  at 
hudson.tasks.test.AbstractTestResultAction.findCorrespondingResult(AbstractTestResultAction.java:252)
  at hudson.tasks.test.TestResult.getPreviousResult(TestResult.java:146)
  ... 125 more


  Commit: a70eb66a170d82beff6865a95891740c872daa5c
      
https://github.com/jenkinsci/junit-plugin/commit/a70eb66a170d82beff6865a95891740c872daa5c
  Author: Andrew Bayer <andrew.ba...@gmail.com>
  Date:   2017-11-08 (Wed, 08 Nov 2017)

  Changed paths:
    M src/main/java/hudson/tasks/test/AbstractTestResultAction.java

  Log Message:
  -----------
  Merge pull request #84 from mwoodland/master

Prevent unsafe cast to TestResult.


Compare: 
https://github.com/jenkinsci/junit-plugin/compare/b98cb6eba3b1...a70eb66a170d

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to