diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-05 14:16:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 14:55:15 +0200 |
commit | b73db446ac9681fdfc4ad602c6da7ce3e36a8588 (patch) | |
tree | 6107f4347c188f4c14840c01167b2f05b2f5ad48 /unotools/qa | |
parent | dfcb982ae8810e22204bc15fd7c119a903900a53 (diff) |
java: combine nested if statements
Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba
Diffstat (limited to 'unotools/qa')
-rw-r--r-- | unotools/qa/complex/tempfile/TestHelper.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/unotools/qa/complex/tempfile/TestHelper.java b/unotools/qa/complex/tempfile/TestHelper.java index d3d82392e787..237c95b9ef11 100644 --- a/unotools/qa/complex/tempfile/TestHelper.java +++ b/unotools/qa/complex/tempfile/TestHelper.java @@ -164,11 +164,9 @@ public class TestHelper { public void KillTempFile ( String sTempFileURL, XSimpleFileAccess xSFA ) { try { - if ( sTempFileURL != null ) { - if ( xSFA != null ) { - xSFA.kill( sTempFileURL ); - Message ( "Tempfile killed successfully." ); - } + if ( sTempFileURL != null && xSFA != null ) { + xSFA.kill( sTempFileURL ); + Message ( "Tempfile killed successfully." ); } } catch ( Exception e ) { @@ -180,11 +178,9 @@ public class TestHelper { public boolean IfTempFileExists( XSimpleFileAccess xSFA, String sTempFileURL ) { boolean bRet = false; try { - if ( sTempFileURL != null ) { - if ( xSFA != null ) { - bRet = xSFA.exists( sTempFileURL ); - Message ( "Tempfile " + ( bRet ? "still " : "no longer " ) + "exists." ); - } + if ( sTempFileURL != null && xSFA != null ) { + bRet = xSFA.exists( sTempFileURL ); + Message ( "Tempfile " + ( bRet ? "still " : "no longer " ) + "exists." ); } } catch( Exception e ) { |