[Libreoffice-commits] core.git: qadevOOo/tests
jan iversen
jani at documentfoundation.org
Fri Dec 11 05:09:17 PST 2015
qadevOOo/tests/java/ifc/io/_XDataOutputStream.java | 31 +++++----------------
1 file changed, 8 insertions(+), 23 deletions(-)
New commits:
commit b0ef4a1618624dc506075aab789581e270a47654
Author: jan iversen <jani at documentfoundation.org>
Date: Wed Dec 9 11:10:40 2015 +0100
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 at documentfoundation.org>
Tested-by: jan iversen <jani at documentfoundation.org>
diff --git a/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java b/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java
index 3643c06..3ea1119 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.");
}
}
}
More information about the Libreoffice-commits
mailing list