[Libreoffice-commits] core.git: javaunohelper/com
rbuj
robert.buj at gmail.com
Tue Jul 29 23:51:12 PDT 2014
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java | 4 ++--
javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java | 2 +-
javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java | 3 +--
javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java | 6 +++---
4 files changed, 7 insertions(+), 8 deletions(-)
New commits:
commit 3e9bddfe6879580353b712d61308852e637f2e3d
Author: rbuj <robert.buj at gmail.com>
Date: Tue Jul 29 21:38:00 2014 +0200
javaunohelper: The assigned value is never used
Change-Id: Ia190a6784fceaf9607ba39f2ef9d5ea4151cfc16
Reviewed-on: https://gerrit.libreoffice.org/10624
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
index c598896..f4cda93 100644
--- a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
@@ -75,7 +75,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream {
{
int count = 0;
try {
- long bytesRead=0;
+ long bytesRead;
if (len >iIn.available()) {
bytesRead = iIn.read(b[0], 0, iIn.available());
}
@@ -102,7 +102,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream {
{
int count = 0;
try {
- long bytesRead=0;
+ long bytesRead;
if (len >iIn.available()) {
bytesRead = iIn.read(b[0], 0, iIn.available());
}
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
index a556bb0..7f4a623 100644
--- a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
@@ -111,7 +111,7 @@ public class XInputStreamToInputStreamAdapter extends InputStream {
int count = 0;
byte [][] tmp = new byte [1][b.length];
try {
- long bytesRead=0;
+ long bytesRead;
int av = xin.available();
if ( av != 0 && len > av) {
bytesRead = xin.readBytes(tmp, av);
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
index c2860db..8488e22 100644
--- a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java
@@ -90,11 +90,10 @@ public class XOutputStreamToByteArrayAdapter
{
if ( externalBuffer )
throw new BufferSizeExceededException("out of buffer space, cannot grow external buffer");
- byte[] newBuffer = null;
while ( values.length > size-position )
size *= 2;
// System.err.println("new buffer size is "+size+" bytes.");
- newBuffer = new byte[size];
+ byte[] newBuffer = new byte[size];
System.arraycopy(buffer, 0, newBuffer, 0, position);
buffer = newBuffer;
}
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
index 8163963..c62b005 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
@@ -494,7 +494,7 @@ XMultiPropertySet
if ((prop.Attributes & PropertyAttribute.READONLY) == PropertyAttribute.READONLY)
throw new com.sun.star.beans.PropertyVetoException();
// The value may be null only if MAYBEVOID attribute is set
- boolean bVoidValue= false;
+ boolean bVoidValue;
if (value instanceof Any)
bVoidValue= ((Any) value).getObject() == null;
else
@@ -505,7 +505,7 @@ XMultiPropertySet
throw new DisposedException("Component is already disposed");
//Check if the argument is allowed
- boolean bValueOk= false;
+ boolean bValueOk;
if (value instanceof Any)
bValueOk= checkType(((Any) value).getObject());
else
@@ -898,7 +898,7 @@ XMultiPropertySet
for (int i= 0; i < nAffectedProps; i++)
{
// get the listener container for the property name
- InterfaceContainer lc= null;
+ InterfaceContainer lc;
if (bVetoable)
lc= aVetoableLC.getContainer(arEvts[i].PropertyName);
else
More information about the Libreoffice-commits
mailing list