summaryrefslogtreecommitdiff
path: root/java/demo/Ice
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-08-26 00:14:02 +0000
committerMichi Henning <michi@zeroc.com>2004-08-26 00:14:02 +0000
commit309c1eca704d587c6bbff6429e92e72b6717ca45 (patch)
tree622b78ef90d764569dd2841688f2413edb770350 /java/demo/Ice
parentFix (diff)
downloadice-309c1eca704d587c6bbff6429e92e72b6717ca45.tar.bz2
ice-309c1eca704d587c6bbff6429e92e72b6717ca45.tar.xz
ice-309c1eca704d587c6bbff6429e92e72b6717ca45.zip
Fixed incorrect calls to Communicator.destroy().
Diffstat (limited to 'java/demo/Ice')
-rw-r--r--java/demo/Ice/hello/Client.java18
-rw-r--r--java/demo/Ice/hello/Server.java20
-rw-r--r--java/demo/Ice/latency/Client.java18
-rw-r--r--java/demo/Ice/latency/Server.java18
-rw-r--r--java/demo/Ice/throughput/Client.java16
-rw-r--r--java/demo/Ice/throughput/Server.java16
-rw-r--r--java/demo/Ice/value/Client.java16
-rw-r--r--java/demo/Ice/value/Server.java16
8 files changed, 101 insertions, 37 deletions
diff --git a/java/demo/Ice/hello/Client.java b/java/demo/Ice/hello/Client.java
index c48c8982d34..6e77b1a3d38 100644
--- a/java/demo/Ice/hello/Client.java
+++ b/java/demo/Ice/hello/Client.java
@@ -165,12 +165,20 @@ public class Client
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
communicator.destroy();
- }
- }
+ }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}
diff --git a/java/demo/Ice/hello/Server.java b/java/demo/Ice/hello/Server.java
index e8a3e3afa4c..c3a0d9b0e3c 100644
--- a/java/demo/Ice/hello/Server.java
+++ b/java/demo/Ice/hello/Server.java
@@ -37,12 +37,20 @@ public class Server
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
- communicator.destroy();
- }
- }
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
+ communicator.destroy();
+ }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}
diff --git a/java/demo/Ice/latency/Client.java b/java/demo/Ice/latency/Client.java
index cfdbfb0ae80..3b801bc4141 100644
--- a/java/demo/Ice/latency/Client.java
+++ b/java/demo/Ice/latency/Client.java
@@ -67,12 +67,20 @@ public class Client
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
communicator.destroy();
- }
- }
+ }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}
diff --git a/java/demo/Ice/latency/Server.java b/java/demo/Ice/latency/Server.java
index 3e06aeeed46..29c86d3703e 100644
--- a/java/demo/Ice/latency/Server.java
+++ b/java/demo/Ice/latency/Server.java
@@ -37,12 +37,20 @@ public class Server
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
communicator.destroy();
- }
- }
+ }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}
diff --git a/java/demo/Ice/throughput/Client.java b/java/demo/Ice/throughput/Client.java
index 38a885837ba..b41aa1fb079 100644
--- a/java/demo/Ice/throughput/Client.java
+++ b/java/demo/Ice/throughput/Client.java
@@ -188,12 +188,20 @@ public class Client
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
communicator.destroy();
}
- }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}
diff --git a/java/demo/Ice/throughput/Server.java b/java/demo/Ice/throughput/Server.java
index 59ca4efe30d..fcb8c941984 100644
--- a/java/demo/Ice/throughput/Server.java
+++ b/java/demo/Ice/throughput/Server.java
@@ -37,12 +37,20 @@ public class Server
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
communicator.destroy();
}
- }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}
diff --git a/java/demo/Ice/value/Client.java b/java/demo/Ice/value/Client.java
index eed414bb581..79369dd4e73 100644
--- a/java/demo/Ice/value/Client.java
+++ b/java/demo/Ice/value/Client.java
@@ -198,12 +198,20 @@ public class Client
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
communicator.destroy();
}
- }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}
diff --git a/java/demo/Ice/value/Server.java b/java/demo/Ice/value/Server.java
index d7d9f31a815..5bd42ec9e5c 100644
--- a/java/demo/Ice/value/Server.java
+++ b/java/demo/Ice/value/Server.java
@@ -37,12 +37,20 @@ public class Server
{
ex.printStackTrace();
status = 1;
- } finally {
- if(communicator != null)
- {
+ }
+
+ if(communicator != null)
+ {
+ try
+ {
communicator.destroy();
}
- }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ status = 1;
+ }
+ }
System.exit(status);
}