Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-08-29 15:55:28 +0000
committerRoland Grunberg2012-08-29 17:56:43 +0000
commitede09bca9df78b00580dbeb04f5b9c30cd315ae3 (patch)
treeb6b4a134d605f11075c9173d035ee6c5d4644385 /systemtap
parent5525b55a3d57b688d2938da68365534d1a1af0b6 (diff)
downloadorg.eclipse.linuxtools-ede09bca9df78b00580dbeb04f5b9c30cd315ae3.tar.gz
org.eclipse.linuxtools-ede09bca9df78b00580dbeb04f5b9c30cd315ae3.tar.xz
org.eclipse.linuxtools-ede09bca9df78b00580dbeb04f5b9c30cd315ae3.zip
Remove exceptions that are declared but not thrown.
Change-Id: Ibf6cfc6a1b3a100d3de72758da86937051326349 Reviewed-on: https://git.eclipse.org/r/7491 Tested-by: Hudson CI Reviewed-by: Roland Grunberg <rgrunber@redhat.com> IP-Clean: Roland Grunberg <rgrunber@redhat.com> Tested-by: Roland Grunberg <rgrunber@redhat.com>
Diffstat (limited to 'systemtap')
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapParser.java8
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchStapGraph.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/TranslationUnitVisitor.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/StringOutputStream.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/c/CDocumentProvider.java5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPDocumentProvider.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java10
10 files changed, 17 insertions, 32 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapParser.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapParser.java
index a85251c4b4..c109182ca5 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapParser.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapParser.java
@@ -314,10 +314,8 @@ public abstract class SystemTapParser extends Job {
/**
* Set whether or not this parser runs in real time. If viewID has already
* been set, this will also attempt to open the view.
- *
- * @throws InterruptedException
*/
- public void setRealTime(boolean val) throws InterruptedException {
+ public void setRealTime(boolean val) {
realTime = val;
}
@@ -326,10 +324,8 @@ public abstract class SystemTapParser extends Job {
* Set the viewID to use for this parser -- see the callgraph.core view
* extension point. If realTime is set to true, this will also attempt to
* open the view.
- *
- * @throws InterruptedException
*/
- public void setViewID(String value) throws InterruptedException {
+ public void setViewID(String value) {
viewID = value;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchStapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchStapGraph.java
index 01e5d91d6f..3d2abf7bce 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchStapGraph.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchStapGraph.java
@@ -126,9 +126,8 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
*
* @param bw
* @return
- * @throws IOException
*/
- public String writeFunctionListToScript(String resourceToSearchFor) throws IOException {
+ public String writeFunctionListToScript(String resourceToSearchFor) {
String toWrite = getFunctionsFromBinary(bin, resourceToSearchFor);
if (toWrite == null || toWrite.length() < 1) {
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/TranslationUnitVisitor.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/TranslationUnitVisitor.java
index d0a227551c..589cab3f67 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/TranslationUnitVisitor.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/TranslationUnitVisitor.java
@@ -12,7 +12,6 @@ package org.eclipse.linuxtools.internal.callgraph.launch;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICElementVisitor;
-import org.eclipse.core.runtime.CoreException;
public class TranslationUnitVisitor implements ICElementVisitor{
private String functions;
@@ -23,7 +22,7 @@ public class TranslationUnitVisitor implements ICElementVisitor{
}
private long time;
@Override
- public boolean visit(ICElement arg0) throws CoreException {
+ public boolean visit(ICElement arg0) {
if (arg0.getElementType() == ICElement.C_FUNCTION) {
functions+=arg0.getElementName() + " "; //$NON-NLS-1$
return false;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
index afcecda44b..cdffc0c8c4 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
@@ -36,7 +36,7 @@ public class SystemTapGraphTest extends TestCase {
}*/
private boolean manual = false;
- public void testGraphLoading() throws InterruptedException {
+ public void testGraphLoading() {
StapGraphParser parse = new StapGraphParser();
parse.setSourcePath(Activator.PLUGIN_LOCATION+"eag.graph");
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java
index 240f002e15..15d6818d9d 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/CallgraphView.java
@@ -836,7 +836,6 @@ public class CallgraphView extends SystemTapView {
//Opens from specified location
open_file = new Action(Messages.getString("CallgraphView.Open")){ //$NON-NLS-1$
public void run(){
- try {
FileDialog dialog = new FileDialog(new Shell(), SWT.DEFAULT);
String filePath = dialog.open();
if (filePath != null){
@@ -845,9 +844,6 @@ public class CallgraphView extends SystemTapView {
new_parser.setViewID(CallGraphConstants.viewID);
new_parser.schedule();
}
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
}
};
return true;
@@ -859,13 +855,9 @@ public class CallgraphView extends SystemTapView {
//Opens from the default location
open_default = new Action(Messages.getString("CallgraphView.OpenLastRun")){ //$NON-NLS-1$
public void run(){
- try {
StapGraphParser new_parser = new StapGraphParser();
new_parser.setViewID(CallGraphConstants.viewID);
new_parser.schedule();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
}
};
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java
index 8fabfec0ee..7015888687 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java
@@ -129,13 +129,15 @@ public class SimpleDocumentProvider extends AbstractDocumentProvider {
/*
* @see org.eclipse.ui.texteditor.AbstractDocumentProvider#createAnnotationModel(java.lang.Object)
*/
- protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+ @Override
+ protected IAnnotationModel createAnnotationModel(Object element) {
return null;
}
/*
* @see org.eclipse.ui.texteditor.AbstractDocumentProvider#doSaveDocument(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object, org.eclipse.jface.text.IDocument, boolean)
*/
+ @Override
protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
if (element instanceof IPathEditorInput) {
IPathEditorInput pei= (IPathEditorInput) element;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/StringOutputStream.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/StringOutputStream.java
index 6586e1ea16..a8515c86fe 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/StringOutputStream.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/StringOutputStream.java
@@ -11,7 +11,6 @@
package org.eclipse.linuxtools.internal.systemtap.ui.ide;
-import java.io.IOException;
import java.io.OutputStream;
public class StringOutputStream extends OutputStream {
@@ -22,7 +21,7 @@ public class StringOutputStream extends OutputStream {
}
@Override
- public void write(int b) throws IOException {
+ public void write(int b) {
str.append((char)b);
}
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/c/CDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/c/CDocumentProvider.java
index 24995d16ca..e015a28b1b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/c/CDocumentProvider.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/c/CDocumentProvider.java
@@ -11,8 +11,6 @@
package org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.c;
-import org.eclipse.core.runtime.CoreException;
-
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.rules.FastPartitioner;
@@ -44,7 +42,8 @@ public class CDocumentProvider extends SimpleDocumentProvider {
LogManager.logDebug("End setupDocument:", this); //$NON-NLS-1$
}
- protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+ @Override
+ protected IAnnotationModel createAnnotationModel(Object element) {
LogManager.logDebug("Start/End createAnnotationModel: element-" + element, this); //$NON-NLS-1$
return new AnnotationModel();
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPDocumentProvider.java
index b6ae21da1b..e92a92de1d 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPDocumentProvider.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPDocumentProvider.java
@@ -12,7 +12,6 @@
package org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.rules.FastPartitioner;
@@ -59,7 +58,7 @@ public class STPDocumentProvider extends SimpleDocumentProvider {
/**
* Instantiates and returns a new AnnotationModel object.
*/
- protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+ protected IAnnotationModel createAnnotationModel(Object element) {
LogManager.logDebug("Start/End createAnnotationModel: element-" + element, this); //$NON-NLS-1$
return new AnnotationModel();
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java
index 3c31f495e7..0119385e0d 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java
@@ -1,6 +1,5 @@
package org.eclipse.linuxtools.systemtap.ui.tests;
-import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -24,7 +23,7 @@ public class SystemtapGuiMockProcess extends Process {
public InputStream getErrorStream() {
return new InputStream() {
@Override
- public int read() throws IOException {
+ public int read() {
return -1;
}
};
@@ -34,7 +33,7 @@ public class SystemtapGuiMockProcess extends Process {
public InputStream getInputStream() {
return new InputStream() {
@Override
- public int read() throws IOException {
+ public int read() {
return -1;
}
};
@@ -43,13 +42,14 @@ public class SystemtapGuiMockProcess extends Process {
@Override
public OutputStream getOutputStream() {
return new OutputStream() {
- public void write(int b) throws IOException {
+ @Override
+ public void write(int b) {
}
};
}
@Override
- public int waitFor() throws InterruptedException {
+ public int waitFor() {
return exitcode;
}

Back to the top