diff options
author | Lars Langhans <lla@openoffice.org> | 2010-07-02 13:14:28 +0200 |
---|---|---|
committer | Lars Langhans <lla@openoffice.org> | 2010-07-02 13:14:28 +0200 |
commit | 897c48e18e269a315eea6d9e465b12acbe7e6295 (patch) | |
tree | 3905e8a8bcbca307ac202c3ecaf31da5717ef68f /test | |
parent | 003d4fcf2bb2ca423355be510eedd78ebfadeb8b (diff) |
sb123:#i111449# cleanups
Diffstat (limited to 'test')
-rw-r--r-- | test/source/java/org/openoffice/test/Argument.java | 2 | ||||
-rw-r--r-- | test/source/java/org/openoffice/test/FileHelper.java | 3 | ||||
-rw-r--r-- | test/source/java/org/openoffice/test/OfficeConnection.java | 28 |
3 files changed, 15 insertions, 18 deletions
diff --git a/test/source/java/org/openoffice/test/Argument.java b/test/source/java/org/openoffice/test/Argument.java index 83c3f2417416..0380375d8519 100644 --- a/test/source/java/org/openoffice/test/Argument.java +++ b/test/source/java/org/openoffice/test/Argument.java @@ -27,7 +27,7 @@ package org.openoffice.test; -final public class Argument { +public final class Argument { public static String get(String name) { return System.getProperty("org.openoffice.test.arg." + name); } diff --git a/test/source/java/org/openoffice/test/FileHelper.java b/test/source/java/org/openoffice/test/FileHelper.java index bd1a00370479..722b31124d43 100644 --- a/test/source/java/org/openoffice/test/FileHelper.java +++ b/test/source/java/org/openoffice/test/FileHelper.java @@ -30,8 +30,7 @@ package org.openoffice.test; /** - * - * @author ll93751 + * Helper Functions for File handling */ public class FileHelper { diff --git a/test/source/java/org/openoffice/test/OfficeConnection.java b/test/source/java/org/openoffice/test/OfficeConnection.java index a7c75557b217..26756ecd05c6 100644 --- a/test/source/java/org/openoffice/test/OfficeConnection.java +++ b/test/source/java/org/openoffice/test/OfficeConnection.java @@ -106,21 +106,19 @@ public final class OfficeConnection { boolean desktopTerminated = true; if (context != null) { - XMultiComponentFactory xMSF = context.getServiceManager(); - if (xMSF != null) - { - XDesktop desktop = UnoRuntime.queryInterface( - XDesktop.class, - xMSF.createInstanceWithContext( - "com.sun.star.frame.Desktop", context)); - context = null; - try { - desktopTerminated = desktop.terminate(); - } catch (DisposedException e) {} - // it appears that DisposedExceptions can already happen while - // receiving the response of the terminate call - desktop = null; - } + final XMultiComponentFactory xMSF = context.getServiceManager(); + assertNotNull("Can't get ServiceManager.", xMSF); + XDesktop desktop = UnoRuntime.queryInterface( + XDesktop.class, + xMSF.createInstanceWithContext( + "com.sun.star.frame.Desktop", context)); + context = null; + try { + desktopTerminated = desktop.terminate(); + } catch (DisposedException e) {} + // it appears that DisposedExceptions can already happen while + // receiving the response of the terminate call + desktop = null; } else if (process != null) { |