diff options
author | rbuj <robert.buj@gmail.com> | 2014-07-31 16:22:15 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-08-01 06:31:58 +0000 |
commit | e36edbb3e5dee78c32dea2a68067906101f4a7c8 (patch) | |
tree | 4e3cbb516515092a18327c28fbe2c21fddf0b0e1 /xmerge | |
parent | 23aa8ea1ac4316c89c0dcbc2da2fef8dfcd9e3c3 (diff) |
xmerge: The assigned value is never used
Change-Id: I1c9730d494546b01836c60f49861784a068ca1a0
Reviewed-on: https://gerrit.libreoffice.org/10660
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmerge')
4 files changed, 7 insertions, 8 deletions
diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java index 2f4897da1f65..87b07a6ecbc4 100644 --- a/xmerge/source/bridge/java/XMergeBridge.java +++ b/xmerge/source/bridge/java/XMergeBridge.java @@ -116,7 +116,7 @@ public class XMergeBridge { String getFileName(String origName) { - String name=null; + String name; if (origName !=null) { if(origName.equalsIgnoreCase("")) @@ -474,7 +474,7 @@ public class XMergeBridge { URI uri=new URI(sURL); String newFileName= getPath(uri); - File newFile=null; + File newFile; if (newFileName.lastIndexOf(".")!=-1){ newFile =new File(newFileName.substring(0,newFileName.lastIndexOf("."))+String.valueOf(i)+newFileName.substring(newFileName.lastIndexOf("."))); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java index 1b4c0d18db17..ccd03e227327 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java @@ -46,7 +46,7 @@ public class ConverterFactory { */ public boolean canConvert(String mimeTypeIn, String mimeTypeOut) { - ConverterInfo foundInfo = null; + ConverterInfo foundInfo; // findConverterInfo expects the second paramenter to be the // destination MimeType @@ -73,7 +73,7 @@ public class ConverterFactory { */ public Convert getConverter(String mimeTypeIn, String mimeTypeOut) { - ConverterInfo foundInfo = null; + ConverterInfo foundInfo; boolean toOffice; toOffice = ConverterInfo.isValidOfficeType(mimeTypeOut); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java index abdeaa7a8fac..1938a4e884d4 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java @@ -83,7 +83,7 @@ class OfficeZip { void read(InputStream is) throws IOException { ZipInputStream zis = new ZipInputStream(is); - ZipEntry ze = null; + ZipEntry ze; int i = -1; while ((ze = zis.getNextEntry()) != null) { @@ -94,7 +94,7 @@ class OfficeZip { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int len = 0; + int len; byte buffer[] = new byte[BUFFERSIZE]; while ((len = zis.read(buffer)) > 0) { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java index 139f078c88d0..34c358dc51fd 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java @@ -119,9 +119,8 @@ public abstract class NodeIterator implements Iterator { public boolean equivalent(Object obj1, Object obj2) { boolean equal = false; - String errMsg = null; if (!(obj1 instanceof Node && obj2 instanceof Node)) { - errMsg = Resources.getInstance().getString("NOT_NODE_ERROR"); + String errMsg = Resources.getInstance().getString("NOT_NODE_ERROR"); Debug.log(Debug.ERROR, errMsg); } else { Node node1 = (Node)obj1; |