diff options
author | sb <sb@openoffice.org> | 2010-07-06 15:12:23 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-07-06 15:12:23 +0200 |
commit | af970845ba8b95a84a45fc84f646c5e5c938f8cb (patch) | |
tree | 9db006011a0f2b0466a4708dd482c315efb98d55 /test | |
parent | 897c48e18e269a315eea6d9e465b12acbe7e6295 (diff) |
sb123: cleaned up the previous cleanup
Diffstat (limited to 'test')
-rw-r--r-- | test/source/java/org/openoffice/test/OfficeConnection.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/source/java/org/openoffice/test/OfficeConnection.java b/test/source/java/org/openoffice/test/OfficeConnection.java index 26756ecd05c6..e87efb210f62 100644 --- a/test/source/java/org/openoffice/test/OfficeConnection.java +++ b/test/source/java/org/openoffice/test/OfficeConnection.java @@ -104,13 +104,12 @@ public final class OfficeConnection { throws InterruptedException, com.sun.star.uno.Exception { boolean desktopTerminated = true; - if (context != null) - { - final XMultiComponentFactory xMSF = context.getServiceManager(); - assertNotNull("Can't get ServiceManager.", xMSF); + if (context != null) { + XMultiComponentFactory factory = context.getServiceManager(); + assertNotNull(factory); XDesktop desktop = UnoRuntime.queryInterface( XDesktop.class, - xMSF.createInstanceWithContext( + factory.createInstanceWithContext( "com.sun.star.frame.Desktop", context)); context = null; try { @@ -119,14 +118,11 @@ public final class OfficeConnection { // it appears that DisposedExceptions can already happen while // receiving the response of the terminate call desktop = null; - } - else if (process != null) - { + } else if (process != null) { process.destroy(); } int code = 0; - if (process != null) - { + if (process != null) { code = process.waitFor(); } boolean outTerminated = outForward == null || outForward.terminated(); |