Kaydet (Commit) 3e9bddfe authored tarafından rbuj's avatar rbuj Kaydeden (comit) Noel Grandin

javaunohelper: The assigned value is never used

Change-Id: Ia190a6784fceaf9607ba39f2ef9d5ea4151cfc16
Reviewed-on: https://gerrit.libreoffice.org/10624Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 19226572
...@@ -75,7 +75,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream { ...@@ -75,7 +75,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream {
{ {
int count = 0; int count = 0;
try { try {
long bytesRead=0; long bytesRead;
if (len >iIn.available()) { if (len >iIn.available()) {
bytesRead = iIn.read(b[0], 0, iIn.available()); bytesRead = iIn.read(b[0], 0, iIn.available());
} }
...@@ -102,7 +102,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream { ...@@ -102,7 +102,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream {
{ {
int count = 0; int count = 0;
try { try {
long bytesRead=0; long bytesRead;
if (len >iIn.available()) { if (len >iIn.available()) {
bytesRead = iIn.read(b[0], 0, iIn.available()); bytesRead = iIn.read(b[0], 0, iIn.available());
} }
......
...@@ -111,7 +111,7 @@ public class XInputStreamToInputStreamAdapter extends InputStream { ...@@ -111,7 +111,7 @@ public class XInputStreamToInputStreamAdapter extends InputStream {
int count = 0; int count = 0;
byte [][] tmp = new byte [1][b.length]; byte [][] tmp = new byte [1][b.length];
try { try {
long bytesRead=0; long bytesRead;
int av = xin.available(); int av = xin.available();
if ( av != 0 && len > av) { if ( av != 0 && len > av) {
bytesRead = xin.readBytes(tmp, av); bytesRead = xin.readBytes(tmp, av);
......
...@@ -90,11 +90,10 @@ public class XOutputStreamToByteArrayAdapter ...@@ -90,11 +90,10 @@ public class XOutputStreamToByteArrayAdapter
{ {
if ( externalBuffer ) if ( externalBuffer )
throw new BufferSizeExceededException("out of buffer space, cannot grow external buffer"); throw new BufferSizeExceededException("out of buffer space, cannot grow external buffer");
byte[] newBuffer = null;
while ( values.length > size-position ) while ( values.length > size-position )
size *= 2; size *= 2;
// System.err.println("new buffer size is "+size+" bytes."); // 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); System.arraycopy(buffer, 0, newBuffer, 0, position);
buffer = newBuffer; buffer = newBuffer;
} }
......
...@@ -494,7 +494,7 @@ XMultiPropertySet ...@@ -494,7 +494,7 @@ XMultiPropertySet
if ((prop.Attributes & PropertyAttribute.READONLY) == PropertyAttribute.READONLY) if ((prop.Attributes & PropertyAttribute.READONLY) == PropertyAttribute.READONLY)
throw new com.sun.star.beans.PropertyVetoException(); throw new com.sun.star.beans.PropertyVetoException();
// The value may be null only if MAYBEVOID attribute is set // The value may be null only if MAYBEVOID attribute is set
boolean bVoidValue= false; boolean bVoidValue;
if (value instanceof Any) if (value instanceof Any)
bVoidValue= ((Any) value).getObject() == null; bVoidValue= ((Any) value).getObject() == null;
else else
...@@ -505,7 +505,7 @@ XMultiPropertySet ...@@ -505,7 +505,7 @@ XMultiPropertySet
throw new DisposedException("Component is already disposed"); throw new DisposedException("Component is already disposed");
//Check if the argument is allowed //Check if the argument is allowed
boolean bValueOk= false; boolean bValueOk;
if (value instanceof Any) if (value instanceof Any)
bValueOk= checkType(((Any) value).getObject()); bValueOk= checkType(((Any) value).getObject());
else else
...@@ -898,7 +898,7 @@ XMultiPropertySet ...@@ -898,7 +898,7 @@ XMultiPropertySet
for (int i= 0; i < nAffectedProps; i++) for (int i= 0; i < nAffectedProps; i++)
{ {
// get the listener container for the property name // get the listener container for the property name
InterfaceContainer lc= null; InterfaceContainer lc;
if (bVetoable) if (bVetoable)
lc= aVetoableLC.getContainer(arEvts[i].PropertyName); lc= aVetoableLC.getContainer(arEvts[i].PropertyName);
else else
......
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