Kaydet (Commit) bc492df7 authored tarafından Noel Grandin's avatar Noel Grandin

cid#1326115 Unchecked return value

and drop some truly bizarre and unnecessary code

Change-Id: I105ba8784b6c4179a3cd7ad5bf9a250fd680d64a
üst a1624a8e
......@@ -127,9 +127,6 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream {
public void skipBytes(int n) throws
com.sun.star.io.IOException
{
int tmpLongVal = n;
int tmpIntVal;
try {
iIn.available();
} catch (IOException e) {
......@@ -137,20 +134,12 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream {
}
do {
if (tmpLongVal >= Integer.MAX_VALUE) {
tmpIntVal = Integer.MAX_VALUE;
} else {
// Casting is safe here.
tmpIntVal = tmpLongVal;
}
tmpLongVal -= tmpIntVal;
try {
iIn.skip(tmpIntVal);
n -= iIn.skip(n);
} catch (IOException e) {
throw new com.sun.star.io.IOException(e);
}
} while (tmpLongVal > 0);
} while (n > 0);
}
}
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