Kaydet (Commit) 8f020a45 authored tarafından Noel Grandin's avatar Noel Grandin

java: redundant assignment, variable can only be null

Change-Id: I91209c5c185cf097a1609244419d73d4757d7d18
üst e5bc8b60
...@@ -722,7 +722,7 @@ XMultiPropertySet ...@@ -722,7 +722,7 @@ XMultiPropertySet
//The member that keeps the value of the Property is an Object.Objects are similar to Anys in that they can //The member that keeps the value of the Property is an Object.Objects are similar to Anys in that they can
// hold all types. // hold all types.
if (obj == null || (obj instanceof Any && ((Any) obj).getObject() == null)) if (obj == null || (obj instanceof Any && ((Any) obj).getObject() == null))
retVal= null; {}
else if(cl.equals(Object.class)) else if(cl.equals(Object.class))
{ {
if (obj instanceof Any) if (obj instanceof Any)
......
...@@ -316,9 +316,7 @@ public class JavaLoader implements XImplementationLoader, ...@@ -316,9 +316,7 @@ public class JavaLoader implements XImplementationLoader,
try { try {
method = clazz.getMethod("__getServiceFactory", paramTypes); method = clazz.getMethod("__getServiceFactory", paramTypes);
} catch ( NoSuchMethodException noSuchMethodEx) { } catch ( NoSuchMethodException noSuchMethodEx) {
method = null;
} catch ( SecurityException secEx) { } catch ( SecurityException secEx) {
method = null;
} }
} }
......
...@@ -175,7 +175,6 @@ public class OfficePrint { ...@@ -175,7 +175,6 @@ public class OfficePrint {
GlobalLogWriter.get().println("UNO Exception caught."); GlobalLogWriter.get().println("UNO Exception caught.");
GlobalLogWriter.get().println("Message: " + e.getMessage()); GlobalLogWriter.get().println("Message: " + e.getMessage());
e.printStackTrace(); e.printStackTrace();
aDoc = null;
} }
return aDoc; return aDoc;
} }
...@@ -706,7 +705,6 @@ public class OfficePrint { ...@@ -706,7 +705,6 @@ public class OfficePrint {
String sInputPath = FileHelper.getPath(_sAbsoluteInputFile); String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
sOutputPath = sInputPath; sOutputPath = sInputPath;
} }
sOutputFileURL = null;
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename); String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
String sPrintFileURL; String sPrintFileURL;
......
...@@ -261,7 +261,6 @@ public class OpenOfficePostscriptCreator implements IOffice ...@@ -261,7 +261,6 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("UNO Exception caught."); GlobalLogWriter.println("UNO Exception caught.");
GlobalLogWriter.println("Message: " + e.getMessage()); GlobalLogWriter.println("Message: " + e.getMessage());
e.printStackTrace(); e.printStackTrace();
aDoc = null;
} }
return aDoc; return aDoc;
} }
......
...@@ -791,12 +791,7 @@ public class APIDescGetter extends DescGetter ...@@ -791,12 +791,7 @@ public class APIDescGetter extends DescGetter
{ {
File dirs = new File(descPath); File dirs = new File(descPath);
if (!dirs.exists()) if (dirs.exists()) {
{
modules = null;
}
else
{
modules = dirs.list(); modules = dirs.list();
} }
} }
......
...@@ -60,7 +60,6 @@ public class URLHelper ...@@ -60,7 +60,6 @@ public class URLHelper
} }
catch( MalformedURLException exWrong ) catch( MalformedURLException exWrong )
{ {
sFileURL = null;
} }
// problem of java: file URL's are coded with 1 slash instead of 2 or 3 ones! // problem of java: file URL's are coded with 1 slash instead of 2 or 3 ones!
......
...@@ -71,7 +71,6 @@ public class _XFramesSupplier extends MultiMethodTest { ...@@ -71,7 +71,6 @@ public class _XFramesSupplier extends MultiMethodTest {
for (int i = 0; i < frames.getCount(); i++) { for (int i = 0; i < frames.getCount(); i++) {
XFrame fr = null ; XFrame fr = null ;
try { try {
fr = null;
try { try {
fr = (XFrame) AnyConverter.toObject( fr = (XFrame) AnyConverter.toObject(
new Type(XFrame.class),frames.getByIndex(i)); new Type(XFrame.class),frames.getByIndex(i));
...@@ -181,8 +180,6 @@ public class _XFramesSupplier extends MultiMethodTest { ...@@ -181,8 +180,6 @@ public class _XFramesSupplier extends MultiMethodTest {
} }
} else if (frames.getCount() > 0) { } else if (frames.getCount() > 0) {
sFrame = active ; sFrame = active ;
} else {
sFrame = null;
} }
oObj.setActiveFrame(sFrame) ; oObj.setActiveFrame(sFrame) ;
......
...@@ -131,7 +131,6 @@ public class CachedDynamicResultSetStubFactory extends TestCase { ...@@ -131,7 +131,6 @@ public class CachedDynamicResultSetStubFactory extends TestCase {
(OpenMode.ALL, 10000, null, new Property[] {prop}, (OpenMode.ALL, 10000, null, new Property[] {prop},
new NumberedSortingInfo[0])) ; new NumberedSortingInfo[0])) ;
dynResSet = null;
try { try {
dynResSet = (XDynamicResultSet) dynResSet = (XDynamicResultSet)
AnyConverter.toObject(new Type(XDynamicResultSet.class), AnyConverter.toObject(new Type(XDynamicResultSet.class),
......
...@@ -496,7 +496,6 @@ public class ParcelZipper ...@@ -496,7 +496,6 @@ public class ParcelZipper
} }
} }
catch (IOException ioe) { catch (IOException ioe) {
result = null;
} }
finally { finally {
try { try {
......
...@@ -160,8 +160,7 @@ public class AccessibilityTree ...@@ -160,8 +160,7 @@ public class AccessibilityTree
if( aExpander.expand( aObj ) ) if( aExpander.expand( aObj ) )
{ {
maTree.expandPath (aPath); maTree.expandPath (aPath);
if( aFirst == null ) aFirst = aPath;
aFirst = aPath;
} }
// visit all children // visit all children
......
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