mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 20:15:22 +00:00
fixed a stream leak
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11275 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
81bf68c5ed
commit
1c698565fa
1 file changed
+11
-6
@@ -147,12 +147,17 @@ public final class PluginWrapper {
|
||||
|
||||
if(isLinked) {
|
||||
// resolve the .hpl file to the location of the manifest file
|
||||
String firstLine = new BufferedReader(new FileReader(archive)).readLine();
|
||||
if(firstLine.startsWith("Manifest-Version:")) {
|
||||
// this is the manifest already
|
||||
} else {
|
||||
// indirection
|
||||
archive = resolve(archive, firstLine);
|
||||
BufferedReader archiveReader = new BufferedReader(new FileReader(archive));
|
||||
try {
|
||||
String firstLine = archiveReader.readLine();
|
||||
if(firstLine.startsWith("Manifest-Version:")) {
|
||||
// this is the manifest already
|
||||
} else {
|
||||
// indirection
|
||||
archive = resolve(archive, firstLine);
|
||||
}
|
||||
} finally {
|
||||
archiveReader.close();
|
||||
}
|
||||
// then parse manifest
|
||||
FileInputStream in = new FileInputStream(archive);
|
||||
|
||||
Reference in new issue
Block a user