Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS-27079 ClassCastException: hudson.scm.SVNRevisionState cannot … #228

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ Provides Jenkins integration with [Apache Subversion](http://subversion.apache.o
See the [Subversion Plugin page](https://plugins.jenkins.io/subversion) for more information.

Apache, Apache Subversion and Subversion are trademarks of the Apache Software Foundation.

> Here is fixed build crushing with error:<br/>
> <i>hudson.scm.SVNRevisionState cannot be cast to hudson.scm.SVNRevisionState</i>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can revert the change to the readme.

6 changes: 4 additions & 2 deletions src/main/java/hudson/scm/SubversionSCM.java
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,11 @@ private void calcChangeLog(Run<?,?> build, FilePath workspace, File changelogFil
// maybe some XSLT engine doesn't close the stream properly.
// so let's do it by ourselves to be really sure that the stream gets closed.
OutputStream os = new BufferedOutputStream(new FileOutputStream(changelogFile));
boolean created;
boolean created = false;
try {
created = new SubversionChangeLogBuilder(build, workspace, (SVNRevisionState) baseline, env, listener, this).run(externalsMap, new StreamResult(os));
if(baseline instanceof SVNRevisionState){
created = new SubversionChangeLogBuilder(build, workspace, (SVNRevisionState) baseline, env, listener, this).run(externalsMap, new StreamResult(os));
}
yanpak marked this conversation as resolved.
Show resolved Hide resolved
} finally {
os.close();
}
Expand Down