[Libreoffice-commits] core.git: xmerge/source
rbuj
robert.buj at gmail.com
Thu Jul 31 23:32:17 PDT 2014
xmerge/source/bridge/java/XMergeBridge.java | 4 ++--
xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java | 4 ++--
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java | 4 ++--
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java | 3 +--
4 files changed, 7 insertions(+), 8 deletions(-)
New commits:
commit e36edbb3e5dee78c32dea2a68067906101f4a7c8
Author: rbuj <robert.buj at gmail.com>
Date: Thu Jul 31 16:22:15 2014 +0200
xmerge: The assigned value is never used
Change-Id: I1c9730d494546b01836c60f49861784a068ca1a0
Reviewed-on: https://gerrit.libreoffice.org/10660
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java
index 2f4897d..87b07a6 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 1b4c0d1..ccd03e2 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 abdeaa7..1938a4e 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 139f078..34c358d 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;
More information about the Libreoffice-commits
mailing list