Kaydet (Commit) 7cba598a authored tarafından Noel Grandin's avatar Noel Grandin

Java cleanup, delete some dead code

Change-Id: I4423cc7ec49769e256f73d9b7fba7b78f84f932f
üst 8be40d31
...@@ -145,8 +145,6 @@ public class Test05 implements StorageTest { ...@@ -145,8 +145,6 @@ public class Test05 implements StorageTest {
XStream xSubStream2clone = m_aTestHelper.OpenStream( xSubSubStorage, XStream xSubStream2clone = m_aTestHelper.OpenStream( xSubSubStorage,
"SubStream2", "SubStream2",
ElementModes.READ | ElementModes.NOCREATE ); ElementModes.READ | ElementModes.NOCREATE );
if ( xSubStream2 == null )
return false;
// so now the first stream can not be open neither for reading nor for writing // so now the first stream can not be open neither for reading nor for writing
......
...@@ -444,10 +444,6 @@ public class OfficeProvider implements AppProvider ...@@ -444,10 +444,6 @@ public class OfficeProvider implements AppProvider
if (debug && exc != null && exc.length() != 0) if (debug && exc != null && exc.length() != 0)
{ {
if (exc == null)
{
exc = "";
}
dbg("Could not connect an Office. " + exc); dbg("Could not connect an Office. " + exc);
} }
......
...@@ -542,26 +542,18 @@ public abstract class ScriptProvider ...@@ -542,26 +542,18 @@ public abstract class ScriptProvider
public java.lang.Object getByName( String aName ) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException public java.lang.Object getByName( String aName ) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException
{ {
// TODO needs implementing? // TODO needs implementing?
if ( true )
{
throw new com.sun.star.uno.RuntimeException( throw new com.sun.star.uno.RuntimeException(
"getByName not implemented" ); "getByName not implemented" );
} }
return new Object();
}
public String[] getElementNames() public String[] getElementNames()
{ {
// TODO needs implementing? // TODO needs implementing?
String[] result = new String[0]; String[] result = new String[0];
if ( true )
{
throw new com.sun.star.uno.RuntimeException( throw new com.sun.star.uno.RuntimeException(
"getElementNames not implemented" ); "getElementNames not implemented" );
} }
return result;
}
// Performs the getRegStatus functionality for the PkgMgr // Performs the getRegStatus functionality for the PkgMgr
...@@ -585,14 +577,8 @@ public abstract class ScriptProvider ...@@ -585,14 +577,8 @@ public abstract class ScriptProvider
public boolean hasElements() public boolean hasElements()
{ {
// TODO needs implementing? // TODO needs implementing?
boolean result = false;
if ( true )
{
throw new com.sun.star.uno.RuntimeException( throw new com.sun.star.uno.RuntimeException(
"hasElements not implemented" ); "hasElements not implemented" );
}
return result;
} }
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 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
{ {
......
...@@ -39,13 +39,9 @@ public class FileUpdater { ...@@ -39,13 +39,9 @@ public class FileUpdater {
count = -1; 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; count = count + 1;
if(s != null) {
s.trim(); s.trim();
xmlArray[count] = s; xmlArray[count] = s;
} }
else
break;
}
} }
catch( IOException ioe ) { catch( IOException ioe ) {
String message = "\nError reading ProtocolHandler.xcu, please view SFrameworkInstall.log."; String message = "\nError reading ProtocolHandler.xcu, please view SFrameworkInstall.log.";
...@@ -113,13 +109,9 @@ public class FileUpdater { ...@@ -113,13 +109,9 @@ public class FileUpdater {
count = -1; 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; count = count + 1;
if(s != null) {
s.trim(); s.trim();
xmlArray[count] = s; xmlArray[count] = s;
} }
else
break;
}
} }
catch( IOException ioe ) { catch( IOException ioe ) {
String message = "Error reading script.xlc, please view SFrameworkInstall.log."; String message = "Error reading script.xlc, please view SFrameworkInstall.log.";
...@@ -189,13 +181,9 @@ public class FileUpdater { ...@@ -189,13 +181,9 @@ public class FileUpdater {
count = -1; 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; count = count + 1;
if(s != null) {
s.trim(); s.trim();
xmlArray[count] = s; xmlArray[count] = s;
} }
else
break;
}
} }
catch( IOException ioe ) { catch( IOException ioe ) {
......
...@@ -135,8 +135,6 @@ class NodeFactory ...@@ -135,8 +135,6 @@ class NodeFactory
AccTreeNode aNode = new AccTreeNode (xAccessible, xContext, sDisplay, aParent); AccTreeNode aNode = new AccTreeNode (xAccessible, xContext, sDisplay, aParent);
addDefaultHandlers (aNode, xContext); addDefaultHandlers (aNode, xContext);
if (aNode == null)
System.out.println ("createDefaultNode == null");
return aNode; return aNode;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment