mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 12:05:21 +02:00
Fix for 210125: [Scanner Discovery] Build output file not released (Patch by Gerhard Schaber)
This commit is contained in:
parent
1fd562b49a
commit
65f5219435
1 changed files with 33 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2007 IBM Corporation and others.
|
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM - Initial API and implementation
|
* IBM - Initial API and implementation
|
||||||
* Tianchao Li (tianchao.li@gmail.com) - arbitrary build directory (bug #136136)
|
* Tianchao Li (tianchao.li@gmail.com) - arbitrary build directory (bug #136136)
|
||||||
|
* Gerhard Schaber (Wind River Systems) - bug 210125
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.make.internal.core.scannerconfig2;
|
package org.eclipse.cdt.make.internal.core.scannerconfig2;
|
||||||
|
|
||||||
|
@ -68,6 +69,8 @@ public class DefaultSIFileReader implements IExternalScannerInfoProvider {
|
||||||
BufferedReader reader = getStreamReader(buildInfo.getBuildOutputFilePath());
|
BufferedReader reader = getStreamReader(buildInfo.getBuildOutputFilePath());
|
||||||
if (reader == null)
|
if (reader == null)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
try {
|
||||||
// output
|
// output
|
||||||
IConsole console = CCorePlugin.getDefault().getConsole(EXTERNAL_SI_PROVIDER_CONSOLE_ID);
|
IConsole console = CCorePlugin.getDefault().getConsole(EXTERNAL_SI_PROVIDER_CONSOLE_ID);
|
||||||
console.start(project);
|
console.start(project);
|
||||||
|
@ -88,8 +91,16 @@ public class DefaultSIFileReader implements IExternalScannerInfoProvider {
|
||||||
ostream = (sniffer == null ? null : sniffer.getOutputStream());
|
ostream = (sniffer == null ? null : sniffer.getOutputStream());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ostream != null) {
|
||||||
rc = readFileToOutputStream(monitor, reader, ostream);
|
rc = readFileToOutputStream(monitor, reader, ostream);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
reader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
MakeCorePlugin.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue