summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-15 10:30:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-15 11:38:57 +0100
commitf0f747015a3c94a607d82848e9b2ce9338a32bcd (patch)
tree6e56fccf93ceff2597d2a31112fc2641915fa7bc /qadevOOo
parenteea7e0cb552ff0cd28e53c1efa7caa839a988718 (diff)
coverity#1326289 Explicit null dereferenced
Change-Id: Ib634ce5ef43748f039e2bd9610398267b19c919a
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/tests/java/ifc/view/_XPrintable.java28
1 files changed, 11 insertions, 17 deletions
diff --git a/qadevOOo/tests/java/ifc/view/_XPrintable.java b/qadevOOo/tests/java/ifc/view/_XPrintable.java
index 52b0357e5684..6a55688be115 100644
--- a/qadevOOo/tests/java/ifc/view/_XPrintable.java
+++ b/qadevOOo/tests/java/ifc/view/_XPrintable.java
@@ -117,29 +117,23 @@ public class _XPrintable extends MultiMethodTest {
* <code>com.sun.star.ucb.SimpleFileAccess</code> cann't be
* created.
*/
- public void _print(){
+ public void _print() throws Exception {
boolean result = true ;
final String file = "XPrintable.prt" ;
final String fileName = utils.getOfficeTempDirSys(tParam.getMSF())+file ;
final String fileURL = utils.getOfficeTemp(tParam.getMSF()) + file ;
- XSimpleFileAccess fAcc = null ;
- try {
- Object oFAcc =
- tParam.getMSF().createInstance
- ("com.sun.star.ucb.SimpleFileAccess") ;
- fAcc = UnoRuntime.queryInterface
- (XSimpleFileAccess.class, oFAcc) ;
- if (fAcc == null) throw new StatusException
- (Status.failed("Can't create SimpleFileAccess service")) ;
- if (fAcc.exists(fileURL)) {
- log.println("Old file exists and will be deleted");
- fAcc.kill(fileURL);
- }
- } catch (com.sun.star.uno.Exception e) {
- log.println("Error accessing file '" + fileURL + "'");
- e.printStackTrace(log);
+ Object oFAcc =
+ tParam.getMSF().createInstance
+ ("com.sun.star.ucb.SimpleFileAccess") ;
+ XSimpleFileAccess fAcc = UnoRuntime.queryInterface
+ (XSimpleFileAccess.class, oFAcc) ;
+ if (fAcc == null) throw new StatusException
+ (Status.failed("Can't create SimpleFileAccess service")) ;
+ if (fAcc.exists(fileURL)) {
+ log.println("Old file exists and will be deleted");
+ fAcc.kill(fileURL);
}
try {