summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-21 21:25:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-21 21:25:50 +0000
commitefd58e2b7286645db66e22abe1cd234a98010bf5 (patch)
treed6a74b3235b80ffe0d472dee5bb3f355d4d0f886 /qadevOOo
parent761af268383e4e7b62e993b262df012f6e1fb332 (diff)
coverity#1399435 Unused value
and coverity#1399438 Unused value coverity#1399439 Unused value its all ok as it was, but doesn't hurt to skip the exception test if the previous test failed anyway Change-Id: I110ac062d72514c51d415944a2250c3095584531
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java28
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions.java16
2 files changed, 23 insertions, 21 deletions
diff --git a/qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java b/qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java
index 767125c3fccd..860eeddcb319 100644
--- a/qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java
+++ b/qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java
@@ -161,21 +161,22 @@ public class _XDocumentInsertable extends MultiMethodTest {
result = false ;
}
- try {
- PropertyValue [] szEmptyArgs = new PropertyValue [0];
- String docURL = "file:///c:/ThisIsAnInvaldURL";
- log.println("Inserting document from URL '" + docURL + "'");
- oObj.insertDocumentFromURL(docURL, szEmptyArgs);
-
- result=false;
-
- } catch (IOException ex) {
- log.println("expected exception was thrown -> ok");
- } catch (com.sun.star.lang.IllegalArgumentException ex) {
- log.println("expected exception was thrown -> ok");
+ if (result) {
+ try {
+ PropertyValue [] szEmptyArgs = new PropertyValue [0];
+ String docURL = "file:///c:/ThisIsAnInvaldURL";
+ log.println("Inserting document from URL '" + docURL + "'");
+ oObj.insertDocumentFromURL(docURL, szEmptyArgs);
+
+ result=false;
+
+ } catch (IOException ex) {
+ log.println("expected exception was thrown -> ok");
+ } catch (com.sun.star.lang.IllegalArgumentException ex) {
+ log.println("expected exception was thrown -> ok");
+ }
}
-
tRes.tested("insertDocumentFromURL()", result);
}
@@ -187,4 +188,3 @@ public class _XDocumentInsertable extends MultiMethodTest {
disposeEnvironment();
}
} // finish class _XDocumentInsertable
-
diff --git a/qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions.java b/qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions.java
index 27c320c46e37..20c4240c35bd 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions.java
@@ -106,13 +106,15 @@ public class _XFunctionDescriptions extends MultiMethodTest {
log.println("OK.");
- try {
- log.println("Now trying to get description with wrong id ... ");
- oObj.getById(-1);
- bResult = false;
- log.println("Exception expected! - FAILED");
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Expected exception " + e + " - OK!");
+ if (bResult) {
+ try {
+ log.println("Now trying to get description with wrong id ... ");
+ oObj.getById(-1);
+ bResult = false;
+ log.println("Exception expected! - FAILED");
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Expected exception " + e + " - OK!");
+ }
}
tRes.tested("getById()", bResult);