Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-05-09 19:46:42 +0000
committerAlexander Kurtakov2012-05-09 19:46:42 +0000
commit19fbe1325bcf9e0b8dbc1f3da3a660dfda7b1e2a (patch)
tree60497b0d4338dc52b553eeb1fc635ed26365a28f /perf/org.eclipse.linuxtools.perf
parent3309483b35f25cecf7bc4824e46e925dce5e488b (diff)
downloadorg.eclipse.linuxtools-19fbe1325bcf9e0b8dbc1f3da3a660dfda7b1e2a.tar.gz
org.eclipse.linuxtools-19fbe1325bcf9e0b8dbc1f3da3a660dfda7b1e2a.tar.xz
org.eclipse.linuxtools-19fbe1325bcf9e0b8dbc1f3da3a660dfda7b1e2a.zip
Move the Reader close to the right place.
It was closing before readLine calls which was causing runtime problems.
Diffstat (limited to 'perf/org.eclipse.linuxtools.perf')
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
index 467cdda855..1e691ce8d3 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
@@ -87,14 +87,7 @@ public class PerfCore {
} catch( IOException e ) {
e.printStackTrace();
- } finally {
- if (null != input) {
- try {
- input.close();
- } catch (IOException e) {
- }
- }
- }
+ }
String line;
try {
while (( line = input.readLine()) != null){
@@ -125,6 +118,13 @@ public class PerfCore {
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
+ } finally {
+ if (null != input) {
+ try {
+ input.close();
+ } catch (IOException e) {
+ }
+ }
}
return events;
}

Back to the top