summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-03 15:06:41 +0200
committerNoel Grandin <noel@peralex.com>2013-05-06 11:45:55 +0200
commit7cba598a7ddcf02771ed31c8d8fce6f7e02ef715 (patch)
treedf44b82e914a29c971c7fa19c820563090d79aaf
parent8be40d31d78723debd47f671544f480c1c606db7 (diff)
Java cleanup, delete some dead code
Change-Id: I4423cc7ec49769e256f73d9b7fba7b78f84f932f
-rw-r--r--odk/examples/java/Storage/Test05.java2
-rw-r--r--qadevOOo/runner/helper/OfficeProvider.java4
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java26
-rw-r--r--scripting/workben/installer/FileUpdater.java30
-rw-r--r--toolkit/test/accessibility/NodeFactory.java2
5 files changed, 15 insertions, 49 deletions
diff --git a/odk/examples/java/Storage/Test05.java b/odk/examples/java/Storage/Test05.java
index 9a21b74e9482..15f37b9661a8 100644
--- a/odk/examples/java/Storage/Test05.java
+++ b/odk/examples/java/Storage/Test05.java
@@ -145,8 +145,6 @@ public class Test05 implements StorageTest {
XStream xSubStream2clone = m_aTestHelper.OpenStream( xSubSubStorage,
"SubStream2",
ElementModes.READ | ElementModes.NOCREATE );
- if ( xSubStream2 == null )
- return false;
// so now the first stream can not be open neither for reading nor for writing
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index ec426a8ba330..c0e573d8c212 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -444,10 +444,6 @@ public class OfficeProvider implements AppProvider
if (debug && exc != null && exc.length() != 0)
{
- if (exc == null)
- {
- exc = "";
- }
dbg("Could not connect an Office. " + exc);
}
diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
index e1d044cc644f..c0d960008263 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
@@ -542,25 +542,17 @@ public abstract class ScriptProvider
public java.lang.Object getByName( String aName ) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException
{
// TODO needs implementing?
- if ( true )
- {
- throw new com.sun.star.uno.RuntimeException(
- "getByName not implemented" );
- }
- return new Object();
+ throw new com.sun.star.uno.RuntimeException(
+ "getByName not implemented" );
}
public String[] getElementNames()
{
// TODO needs implementing?
String[] result = new String[0];
- if ( true )
- {
- throw new com.sun.star.uno.RuntimeException(
- "getElementNames not implemented" );
+ throw new com.sun.star.uno.RuntimeException(
+ "getElementNames not implemented" );
- }
- return result;
}
@@ -585,14 +577,8 @@ public abstract class ScriptProvider
public boolean hasElements()
{
// TODO needs implementing?
- boolean result = false;
- if ( true )
- {
- throw new com.sun.star.uno.RuntimeException(
- "hasElements not implemented" );
-
- }
- return result;
+ throw new com.sun.star.uno.RuntimeException(
+ "hasElements not implemented" );
}
public void replaceByName( String aName, java.lang.Object aElement ) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException
{
diff --git a/scripting/workben/installer/FileUpdater.java b/scripting/workben/installer/FileUpdater.java
index 1e75aef6177d..786b8f44bda8 100644
--- a/scripting/workben/installer/FileUpdater.java
+++ b/scripting/workben/installer/FileUpdater.java
@@ -37,14 +37,10 @@ public class FileUpdater {
try {
BufferedReader reader = new BufferedReader(new FileReader(in_file));
count = -1;
- for (String s = reader.readLine(); s != null; s = reader.readLine()) { //</oor:node>
+ for (String s = reader.readLine(); s != null; s = reader.readLine()) { //</oor:node>
count = count + 1;
- if(s != null) {
- s.trim();
- xmlArray[count] = s;
- }
- else
- break;
+ s.trim();
+ xmlArray[count] = s;
}
}
catch( IOException ioe ) {
@@ -111,14 +107,10 @@ public class FileUpdater {
try {
BufferedReader reader = new BufferedReader(new FileReader(in_file));
count = -1;
- for (String s = reader.readLine(); s != null; s = reader.readLine()) { //</oor:node>
+ for (String s = reader.readLine(); s != null; s = reader.readLine()) { //</oor:node>
count = count + 1;
- if(s != null) {
- s.trim();
- xmlArray[count] = s;
- }
- else
- break;
+ s.trim();
+ xmlArray[count] = s;
}
}
catch( IOException ioe ) {
@@ -187,14 +179,10 @@ public class FileUpdater {
try {
BufferedReader reader = new BufferedReader(new FileReader(in_file));
count = -1;
- for (String s = reader.readLine(); s != null; s = reader.readLine()) {
+ for (String s = reader.readLine(); s != null; s = reader.readLine()) {
count = count + 1;
- if(s != null) {
- s.trim();
- xmlArray[count] = s;
- }
- else
- break;
+ s.trim();
+ xmlArray[count] = s;
}
}
catch( IOException ioe ) {
diff --git a/toolkit/test/accessibility/NodeFactory.java b/toolkit/test/accessibility/NodeFactory.java
index 5a53b91d3c7b..7218c3545c1a 100644
--- a/toolkit/test/accessibility/NodeFactory.java
+++ b/toolkit/test/accessibility/NodeFactory.java
@@ -135,8 +135,6 @@ class NodeFactory
AccTreeNode aNode = new AccTreeNode (xAccessible, xContext, sDisplay, aParent);
addDefaultHandlers (aNode, xContext);
- if (aNode == null)
- System.out.println ("createDefaultNode == null");
return aNode;
}