summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-05 13:11:50 +0200
committerNoel Grandin <noel@peralex.com>2014-08-08 09:48:19 +0200
commit8f020a45fa69c9458844b8b621df2e0b15ec3d16 (patch)
treed428a990718d1c7f14ab22f058f74daf7ffebacc /qadevOOo
parente5bc8b60ecfca09a2014ab7090659f3428c8efa0 (diff)
java: redundant assignment, variable can only be null
Change-Id: I91209c5c185cf097a1609244419d73d4757d7d18
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java2
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java1
-rw-r--r--qadevOOo/runner/helper/APIDescGetter.java7
-rw-r--r--qadevOOo/runner/helper/URLHelper.java1
-rw-r--r--qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java3
-rw-r--r--qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java1
6 files changed, 1 insertions, 14 deletions
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 801987849d9c..6476f44e4226 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -175,7 +175,6 @@ public class OfficePrint {
GlobalLogWriter.get().println("UNO Exception caught.");
GlobalLogWriter.get().println("Message: " + e.getMessage());
e.printStackTrace();
- aDoc = null;
}
return aDoc;
}
@@ -706,7 +705,6 @@ public class OfficePrint {
String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
sOutputPath = sInputPath;
}
- sOutputFileURL = null;
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
String sPrintFileURL;
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 37cba43a2dc2..75acf919b130 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -261,7 +261,6 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("UNO Exception caught.");
GlobalLogWriter.println("Message: " + e.getMessage());
e.printStackTrace();
- aDoc = null;
}
return aDoc;
}
diff --git a/qadevOOo/runner/helper/APIDescGetter.java b/qadevOOo/runner/helper/APIDescGetter.java
index a7c97dc37b17..ef1e7513db73 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -791,12 +791,7 @@ public class APIDescGetter extends DescGetter
{
File dirs = new File(descPath);
- if (!dirs.exists())
- {
- modules = null;
- }
- else
- {
+ if (dirs.exists()) {
modules = dirs.list();
}
}
diff --git a/qadevOOo/runner/helper/URLHelper.java b/qadevOOo/runner/helper/URLHelper.java
index 9bb6f7d9deaa..9cd18fb9d3f5 100644
--- a/qadevOOo/runner/helper/URLHelper.java
+++ b/qadevOOo/runner/helper/URLHelper.java
@@ -60,7 +60,6 @@ public class URLHelper
}
catch( MalformedURLException exWrong )
{
- sFileURL = null;
}
// problem of java: file URL's are coded with 1 slash instead of 2 or 3 ones!
diff --git a/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java b/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java
index ae25433d1277..64997de99028 100644
--- a/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java
+++ b/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java
@@ -71,7 +71,6 @@ public class _XFramesSupplier extends MultiMethodTest {
for (int i = 0; i < frames.getCount(); i++) {
XFrame fr = null ;
try {
- fr = null;
try {
fr = (XFrame) AnyConverter.toObject(
new Type(XFrame.class),frames.getByIndex(i));
@@ -181,8 +180,6 @@ public class _XFramesSupplier extends MultiMethodTest {
}
} else if (frames.getCount() > 0) {
sFrame = active ;
- } else {
- sFrame = null;
}
oObj.setActiveFrame(sFrame) ;
diff --git a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
index c44e903a4e8f..baecaa3e8673 100644
--- a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
+++ b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
@@ -131,7 +131,6 @@ public class CachedDynamicResultSetStubFactory extends TestCase {
(OpenMode.ALL, 10000, null, new Property[] {prop},
new NumberedSortingInfo[0])) ;
- dynResSet = null;
try {
dynResSet = (XDynamicResultSet)
AnyConverter.toObject(new Type(XDynamicResultSet.class),