diff options
author | Alexander Kurtakov | 2016-05-16 10:40:38 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-05-16 11:11:31 +0000 |
commit | eac47531287848ae58678be9f26b04e6e22c4844 (patch) | |
tree | 3df4dd95ad1745be385323b0b391b98fd384961f | |
parent | a2e1946a1c8da307b8153d9ad14a8d8eda26fbf9 (diff) | |
download | org.eclipse.linuxtools-eac47531287848ae58678be9f26b04e6e22c4844.tar.gz org.eclipse.linuxtools-eac47531287848ae58678be9f26b04e6e22c4844.tar.xz org.eclipse.linuxtools-eac47531287848ae58678be9f26b04e6e22c4844.zip |
systemtap: Remove useless instanceof checks.
Change-Id: I56d0b902c6bdb456784d8acf53003f6de098b2ab
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/72808
Tested-by: Hudson CI
3 files changed, 4 insertions, 15 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 e558a220a0..072b418b1a 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 @@ -28,7 +28,7 @@ public abstract class SystemTapParser extends Job { protected SystemTapView view; protected boolean realTime = false; protected Object data; - protected Object internalData; + protected BufferedReader internalData; private String secondaryID = ""; //$NON-NLS-1$ public boolean done; diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextParser.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextParser.java index d6d205ee1b..bc38a98b37 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextParser.java +++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextParser.java @@ -33,11 +33,7 @@ public class SystemTapTextParser extends SystemTapParser{ @Override public IStatus realTimeParsing() { - if (!(internalData instanceof BufferedReader)) { - return Status.CANCEL_STATUS; - } - - BufferedReader buff = (BufferedReader) internalData; + BufferedReader buff = internalData; StringBuffer text = new StringBuffer(); String line; diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java index 8c55552664..edee708a4b 100644 --- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java +++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraphParser.java @@ -388,10 +388,7 @@ public class StapGraphParser extends SystemTapParser { private IStatus parseDotFile() { - if (!(internalData instanceof BufferedReader)) - return Status.CANCEL_STATUS; - - BufferedReader buff = (BufferedReader) internalData; + BufferedReader buff = internalData; HashMap <Integer, ArrayList<Integer>> outNeighbours= new HashMap<>(); ArrayList<String> nameList = new ArrayList<>(); @@ -500,11 +497,7 @@ public class StapGraphParser extends SystemTapParser { @Override public IStatus realTimeParsing() { - if (!(internalData instanceof BufferedReader)) { - return Status.CANCEL_STATUS; - } - - BufferedReader buff = (BufferedReader) internalData; + BufferedReader buff = internalData; String line; boolean draw = false; |