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
//The member that keeps the value of the Property is an Object.Objects are similar to Anys in that they can
// hold all types.
if (obj == null || (obj instanceof Any && ((Any) obj).getObject() == null))
retVal= null;
{}
else if(cl.equals(Object.class))
{
if (obj instanceof Any)
......
......@@ -316,9 +316,7 @@ public class JavaLoader implements XImplementationLoader,
try {
method = clazz.getMethod("__getServiceFactory", paramTypes);
} catch ( NoSuchMethodException noSuchMethodEx) {
method = null;
} catch ( SecurityException secEx) {
method = null;
}
}
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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();
}
}
......
......@@ -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!
......
......@@ -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) ;
......
......@@ -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),
......
......@@ -496,7 +496,6 @@ public class ParcelZipper
}
}
catch (IOException ioe) {
result = null;
}
finally {
try {
......
......@@ -160,8 +160,7 @@ public class AccessibilityTree
if( aExpander.expand( aObj ) )
{
maTree.expandPath (aPath);
if( aFirst == null )
aFirst = aPath;
aFirst = aPath;
}
// 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