Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Wagiaalla2013-04-30 10:35:28 -0400
committerCamilo Bernal2013-05-01 13:05:35 -0400
commit8fa10880836baa856c7d8941f17ebdcd6baba27a (patch)
treecdc60d5090d0e2a702d1c018dba3cb26878cad48 /systemtap/org.eclipse.linuxtools.systemtap.ui.tests
parent0a1a9e41a78692cd56a0fa5abdf788b9bdb0530c (diff)
downloadorg.eclipse.linuxtools-8fa10880836baa856c7d8941f17ebdcd6baba27a.tar.gz
org.eclipse.linuxtools-8fa10880836baa856c7d8941f17ebdcd6baba27a.tar.xz
org.eclipse.linuxtools-8fa10880836baa856c7d8941f17ebdcd6baba27a.zip
Remove all e.printStackTrace() calls
Also, - Organized imports. - Added braces around single line if/while statements. - Externalize strings. Change-Id: I81ddcc593666629c79f24e35192407a8c3a2abfa Reviewed-on: https://git.eclipse.org/r/12386 Tested-by: Hudson CI Reviewed-by: Camilo Bernal <cabernal@redhat.com> IP-Clean: Camilo Bernal <cabernal@redhat.com> Tested-by: Camilo Bernal <cabernal@redhat.com>
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.ui.tests')
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapTest.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapTest.java
index 3d8e80a829..a7f617bbd7 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapTest.java
@@ -22,7 +22,7 @@ public class SystemtapTest {
public static boolean stapInstalled;
@BeforeClass
- public static void checkStapInstalled() {
+ public static void checkStapInstalled() throws IOException {
stapInstalled = SystemtapTest.stapInstalled();
}
@@ -30,15 +30,11 @@ public class SystemtapTest {
* Check that stap is installed
*
* @return true if stap is installed, false otherwise.
+ * @throws IOException
*/
- public static boolean stapInstalled() {
- try {
- Process process = RuntimeProcessFactory.getFactory().exec(
- new String[] { "stap", "-V" }, null);
- return (process != null);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return false;
+ protected static boolean stapInstalled() throws IOException {
+ Process process = RuntimeProcessFactory.getFactory().exec(
+ new String[] { "stap", "-V" }, null); //$NON-NLS-1$ //$NON-NLS-2$
+ return (process != null);
}
}

Back to the top