summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/io
diff options
context:
space:
mode:
authorjan iversen <jani@documentfoundation.org>2015-12-09 11:10:40 +0100
committerjan iversen <jani@documentfoundation.org>2015-12-11 13:08:49 +0000
commitb0ef4a1618624dc506075aab789581e270a47654 (patch)
tree935c4d3a8014ad1d39bc3f71e25e782ed6e2c69c /qadevOOo/tests/java/ifc/io
parentd118979da4a44691268dbfb1fb01b6ed3954885e (diff)
cid#1326581-8 useless calls.
Rebuild the type check to one set of "or" and a throw Change-Id: I99bf688bdf60c357be4cc5dcd9b7be2532b6fbdb Reviewed-on: https://gerrit.libreoffice.org/20491 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'qadevOOo/tests/java/ifc/io')
-rw-r--r--qadevOOo/tests/java/ifc/io/_XDataOutputStream.java31
1 files changed, 8 insertions, 23 deletions
diff --git a/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java b/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java
index 3643c06e4ce6..3ea11193d58b 100644
--- a/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java
+++ b/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java
@@ -69,29 +69,14 @@ public class _XDataOutputStream extends MultiMethodTest {
for (int i = 0; i < data.size(); i++) {
dataElem = data.get(i) ;
- if (dataElem instanceof Boolean) {
- ((Boolean)dataElem).booleanValue();
- }
- else if (dataElem instanceof Byte) {
- ((Byte)dataElem).byteValue();
- }
- else if (dataElem instanceof Character) {
- ((Character)dataElem).charValue();
- }
- else if (dataElem instanceof Short) {
- ((Short)dataElem).shortValue();
- }
- else if (dataElem instanceof Integer) {
- ((Integer)dataElem).intValue();
- }
- else if (dataElem instanceof Long) {
- ((Long)dataElem).longValue();
- }
- else if (dataElem instanceof Float) {
- ((Float)dataElem).floatValue();
- }
- else if (dataElem instanceof Double) {
- ((Double)dataElem).doubleValue();
+ if (!(dataElem instanceof Boolean ||
+ dataElem instanceof Byte) ||
+ dataElem instanceof Character ||
+ dataElem instanceof Short ||
+ dataElem instanceof Integer ||
+ dataElem instanceof Float ||
+ dataElem instanceof Double) {
+ throw new RuntimeException("Object dataElem type not found.");
}
}
}