mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 14:02:22 +00:00
if no entry is created, we end up trying to write over while we still have one more file handle open.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3584 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
1fef2944ab
commit
2e3febe521
1 file changed
+4
-2
@@ -179,12 +179,14 @@ public class SubversionSCM extends SCM implements Serializable {
|
||||
// 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;
|
||||
try {
|
||||
if(!new SubversionChangeLogBuilder(build,listener,this).run(externals,new StreamResult(os)))
|
||||
createEmptyChangeLog(changelogFile, listener, "log");
|
||||
created = new SubversionChangeLogBuilder(build, listener, this).run(externals, new StreamResult(os));
|
||||
} finally {
|
||||
os.close();
|
||||
}
|
||||
if(!created)
|
||||
createEmptyChangeLog(changelogFile, listener, "log");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user