qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java | 28 ++++++------- qadevOOo/tests/java/ifc/sheet/_XFunctionDescriptions.java | 16 ++++--- 2 files changed, 23 insertions(+), 21 deletions(-)
New commits: commit efd58e2b7286645db66e22abe1cd234a98010bf5 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jan 21 21:25:50 2017 +0000 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 diff --git a/qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java b/qadevOOo/tests/java/ifc/document/_XDocumentInsertable.java index 767125c..860eedd 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 27c320c..20c4240 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);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits