summaryrefslogtreecommitdiff
path: root/javaunohelper/com/sun/star/lib
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-15 09:25:48 +0200
committerNoel Grandin <noel@peralex.com>2015-10-15 09:25:48 +0200
commitbc492df7132d25d221fb44a24409a393ae6aa6ff (patch)
treea0d6be4b444e19958a9dd5f5aab824fad29b1d0b /javaunohelper/com/sun/star/lib
parenta1624a8ecd933f9efde940eea8ac0cc1db63cd5d (diff)
cid#1326115 Unchecked return value
and drop some truly bizarre and unnecessary code Change-Id: I105ba8784b6c4179a3cd7ad5bf9a250fd680d64a
Diffstat (limited to 'javaunohelper/com/sun/star/lib')
-rw-r--r--javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java15
1 files changed, 2 insertions, 13 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
index 0053c4dfee70..3d60e5a1181a 100644
--- a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
+++ b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java
@@ -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);
}
}