diff options
Diffstat (limited to 'java/demo/Ice/hello/Server.java')
-rw-r--r-- | java/demo/Ice/hello/Server.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/java/demo/Ice/hello/Server.java b/java/demo/Ice/hello/Server.java index 9dd38f7b603..42b62fdc16b 100644 --- a/java/demo/Ice/hello/Server.java +++ b/java/demo/Ice/hello/Server.java @@ -42,20 +42,12 @@ public class Server { ex.printStackTrace(); status = 1; - } - - if(communicator != null) - { - try - { - communicator.destroy(); - } - catch(Ice.LocalException ex) - { - ex.printStackTrace(); - status = 1; - } - } + } finally { + if(communicator != null) + { + communicator.destroy(); + } + } System.exit(status); } |