summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/ant/Slice2FreezeJTask.java4
-rw-r--r--java/ant/SliceTask.java2
-rw-r--r--java/demo/Freeze/bench/Client.java2
-rw-r--r--java/src/Ice/AMI_Object_ice_invoke.java2
-rw-r--r--java/src/Ice/PropertiesI.java2
-rw-r--r--java/src/Ice/_AMD_Object_ice_invoke.java2
-rw-r--r--java/src/IceInternal/IncomingAsync.java2
-rw-r--r--java/src/IceInternal/IncomingBase.java2
-rw-r--r--java/src/IceInternal/LocatorInfo.java2
-rw-r--r--java/src/IceInternal/LocatorTable.java2
-rw-r--r--java/test/Freeze/complex/Client.java2
-rw-r--r--java/test/Ice/exceptions/AllTests.java34
-rw-r--r--java/test/Ice/faultTolerance/AllTests.java12
-rw-r--r--java/test/Ice/operations/Twoways.java2
-rw-r--r--java/test/Ice/operations/TwowaysAMI.java96
-rw-r--r--java/test/Ice/operationsAMD/MyDerivedClassI.java2
-rw-r--r--java/test/Ice/slicing/build.xml2
-rw-r--r--java/test/Ice/slicing/exceptions/Test.ice4
-rw-r--r--java/test/Ice/slicing/exceptions/csrc/AllTests.java750
-rwxr-xr-xjava/test/Ice/slicing/exceptions/run.py24
-rw-r--r--java/test/Ice/slicing/exceptions/ssrc/TestI.java2
-rw-r--r--java/test/Ice/slicing/exceptionsAMD/ServerPrivateAMD.ice40
-rw-r--r--java/test/Ice/slicing/exceptionsAMD/TestAMD.ice59
-rw-r--r--java/test/Ice/slicing/exceptionsAMD/TestI.java166
-rw-r--r--java/test/Ice/slicing/exceptionsAMD/build.xml61
25 files changed, 1176 insertions, 102 deletions
diff --git a/java/ant/Slice2FreezeJTask.java b/java/ant/Slice2FreezeJTask.java
index c144137d6ae..a868cd28c0f 100644
--- a/java/ant/Slice2FreezeJTask.java
+++ b/java/ant/Slice2FreezeJTask.java
@@ -476,7 +476,7 @@ public class Slice2FreezeJTask extends SliceTask
{
return _value;
}
- };
+ }
public class Index
@@ -534,7 +534,7 @@ public class Slice2FreezeJTask extends SliceTask
return _caseSensitive;
}
- };
+ }
private java.util.List _dicts = new java.util.LinkedList();
diff --git a/java/ant/SliceTask.java b/java/ant/SliceTask.java
index 35d1dd5752c..e0041783254 100644
--- a/java/ant/SliceTask.java
+++ b/java/ant/SliceTask.java
@@ -308,7 +308,7 @@ public class SliceTask extends org.apache.tools.ant.Task
public String[] _dependencies;
public long _timeStamp;
- };
+ }
protected File _dependencyFile;
protected File _outputDir;
diff --git a/java/demo/Freeze/bench/Client.java b/java/demo/Freeze/bench/Client.java
index f136c77303b..1937b2b6627 100644
--- a/java/demo/Freeze/bench/Client.java
+++ b/java/demo/Freeze/bench/Client.java
@@ -133,7 +133,7 @@ class TestApp extends Ice.Application
private java.util.Random _r;
private int _max;
- };
+ }
static class SequentialGenerator implements Generator
{
diff --git a/java/src/Ice/AMI_Object_ice_invoke.java b/java/src/Ice/AMI_Object_ice_invoke.java
index 3627d90e5d3..5470aaec358 100644
--- a/java/src/Ice/AMI_Object_ice_invoke.java
+++ b/java/src/Ice/AMI_Object_ice_invoke.java
@@ -51,4 +51,4 @@ public abstract class AMI_Object_ice_invoke extends IceInternal.OutgoingAsync
}
ice_response(ok, outParams);
}
-};
+}
diff --git a/java/src/Ice/PropertiesI.java b/java/src/Ice/PropertiesI.java
index 3a732e93a2b..71945569788 100644
--- a/java/src/Ice/PropertiesI.java
+++ b/java/src/Ice/PropertiesI.java
@@ -580,7 +580,7 @@ final class PropertiesI extends LocalObjectImpl implements Properties
}
public static java.util.HashMap _validProps = new java.util.HashMap();
- }
+ };
private static final ValidProps _vp = new ValidProps();
}
diff --git a/java/src/Ice/_AMD_Object_ice_invoke.java b/java/src/Ice/_AMD_Object_ice_invoke.java
index 0ec3a81468c..d8b04c34355 100644
--- a/java/src/Ice/_AMD_Object_ice_invoke.java
+++ b/java/src/Ice/_AMD_Object_ice_invoke.java
@@ -43,4 +43,4 @@ final class _AMD_Object_ice_invoke extends IceInternal.IncomingAsync implements
{
__exception(ex);
}
-};
+}
diff --git a/java/src/IceInternal/IncomingAsync.java b/java/src/IceInternal/IncomingAsync.java
index 25372dd4485..44d006e9052 100644
--- a/java/src/IceInternal/IncomingAsync.java
+++ b/java/src/IceInternal/IncomingAsync.java
@@ -193,4 +193,4 @@ public class IncomingAsync extends IncomingBase
}
protected boolean _finished;
-};
+}
diff --git a/java/src/IceInternal/IncomingBase.java b/java/src/IceInternal/IncomingBase.java
index c9be07b844e..d8d5b638bdd 100644
--- a/java/src/IceInternal/IncomingBase.java
+++ b/java/src/IceInternal/IncomingBase.java
@@ -184,4 +184,4 @@ public class IncomingBase
protected BasicStream _os;
private Connection _connection;
-};
+}
diff --git a/java/src/IceInternal/LocatorInfo.java b/java/src/IceInternal/LocatorInfo.java
index 21332e9a0ad..f3406ff9fd4 100644
--- a/java/src/IceInternal/LocatorInfo.java
+++ b/java/src/IceInternal/LocatorInfo.java
@@ -263,5 +263,5 @@ public final class LocatorInfo
private final Ice.LocatorPrx _locator;
private Ice.LocatorRegistryPrx _locatorRegistry;
private final LocatorTable _table;
-};
+}
diff --git a/java/src/IceInternal/LocatorTable.java b/java/src/IceInternal/LocatorTable.java
index 45dcdd80d06..b5b2197cb26 100644
--- a/java/src/IceInternal/LocatorTable.java
+++ b/java/src/IceInternal/LocatorTable.java
@@ -65,5 +65,5 @@ final class LocatorTable
private java.util.HashMap _adapterEndpointsTable = new java.util.HashMap();
private java.util.HashMap _objectTable = new java.util.HashMap();
-};
+}
diff --git a/java/test/Freeze/complex/Client.java b/java/test/Freeze/complex/Client.java
index 24daa5d68a6..b48f0fb29aa 100644
--- a/java/test/Freeze/complex/Client.java
+++ b/java/test/Freeze/complex/Client.java
@@ -80,7 +80,7 @@ public class Client
"2+(5*3)",
"5*(2+3)",
"10+(10+(20+(8*(2*(3*2+4+5+6)))))"
- };
+ }
Complex.ComplexDict m = new Complex.ComplexDict(_connection, dbName, true);
diff --git a/java/test/Ice/exceptions/AllTests.java b/java/test/Ice/exceptions/AllTests.java
index dbc36bc34af..295bd53db71 100644
--- a/java/test/Ice/exceptions/AllTests.java
+++ b/java/test/Ice/exceptions/AllTests.java
@@ -63,7 +63,7 @@ public class AllTests
}
private boolean _called;
- };
+ }
private static class AMI_Thrower_throwAasAI extends AMI_Thrower_throwAasA
{
@@ -104,7 +104,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwAasAObjectNotExistI extends AMI_Thrower_throwAasA
{
@@ -146,7 +146,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwAasAFacetNotExistI extends AMI_Thrower_throwAasA
{
@@ -188,7 +188,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwAasAFacetNotExist2I extends AMI_Thrower_throwAasA
{
@@ -231,7 +231,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwAorDasAorDI extends AMI_Thrower_throwAorDasAorD
{
@@ -276,7 +276,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwBasAI extends AMI_Thrower_throwBasA
{
@@ -318,7 +318,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwCasAI extends AMI_Thrower_throwCasA
{
@@ -361,7 +361,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwBasBI extends AMI_Thrower_throwBasB
{
@@ -403,7 +403,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwCasBI extends AMI_Thrower_throwCasB
{
@@ -446,7 +446,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwCasCI extends AMI_Thrower_throwCasC
{
@@ -489,7 +489,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwUndeclaredAI extends AMI_Thrower_throwUndeclaredA
{
@@ -523,7 +523,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwUndeclaredBI extends AMI_Thrower_throwUndeclaredB
{
@@ -557,7 +557,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwUndeclaredCI extends AMI_Thrower_throwUndeclaredC
{
@@ -591,7 +591,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwLocalExceptionI extends AMI_Thrower_throwLocalException
{
@@ -625,7 +625,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Thrower_throwNonIceExceptionI extends AMI_Thrower_throwNonIceException
{
@@ -659,7 +659,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_WrongOperation_noSuchOperationI extends AMI_WrongOperation_noSuchOperation
{
@@ -694,7 +694,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
public static ThrowerPrx
allTests(Ice.Communicator communicator, boolean collocated)
diff --git a/java/test/Ice/faultTolerance/AllTests.java b/java/test/Ice/faultTolerance/AllTests.java
index 8820f0a7be4..c4c202aff77 100644
--- a/java/test/Ice/faultTolerance/AllTests.java
+++ b/java/test/Ice/faultTolerance/AllTests.java
@@ -63,7 +63,7 @@ public class AllTests
}
private boolean _called;
- };
+ }
private static class AMI_Test_pidI extends AMI_Test_pid
{
@@ -101,7 +101,7 @@ public class AllTests
private int _pid;
private Callback callback = new Callback();
- };
+ }
private static class AMI_Test_shutdownI extends AMI_Test_shutdown
{
@@ -130,7 +130,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Test_abortI extends AMI_Test_abort
{
@@ -170,7 +170,7 @@ public class AllTests
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_Test_idempotentAbortI extends AMI_Test_idempotentAbort
{
@@ -199,7 +199,7 @@ public class AllTests
}
private AMI_Test_abortI delegate = new AMI_Test_abortI();
- };
+ }
private static class AMI_Test_nonmutatingAbortI extends AMI_Test_nonmutatingAbort
{
@@ -228,7 +228,7 @@ public class AllTests
}
private AMI_Test_abortI delegate = new AMI_Test_abortI();
- };
+ }
public static void
allTests(Ice.Communicator communicator, int[] ports)
diff --git a/java/test/Ice/operations/Twoways.java b/java/test/Ice/operations/Twoways.java
index d18e5b23c0d..3f5535d6e96 100644
--- a/java/test/Ice/operations/Twoways.java
+++ b/java/test/Ice/operations/Twoways.java
@@ -174,7 +174,7 @@ class Twoways
(byte)0x11,
(byte)0x12,
(byte)0x22
- };
+ }
final byte[] bsi2 =
{
(byte)0xf1,
diff --git a/java/test/Ice/operations/TwowaysAMI.java b/java/test/Ice/operations/TwowaysAMI.java
index 08f8ae64d12..237a1e16e95 100644
--- a/java/test/Ice/operations/TwowaysAMI.java
+++ b/java/test/Ice/operations/TwowaysAMI.java
@@ -63,7 +63,7 @@ class TwowaysAMI
}
private boolean _called;
- };
+ }
private static class AMI_MyClass_opVoidI extends Test.AMI_MyClass_opVoid
{
@@ -86,7 +86,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opByteI extends Test.AMI_MyClass_opByte
{
@@ -111,7 +111,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opBoolI extends Test.AMI_MyClass_opBool
{
@@ -136,7 +136,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opShortIntLongI extends Test.AMI_MyClass_opShortIntLong
{
@@ -163,7 +163,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opFloatDoubleI extends Test.AMI_MyClass_opFloatDouble
{
@@ -189,7 +189,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opStringI extends Test.AMI_MyClass_opString
{
@@ -214,7 +214,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opMyEnumI extends Test.AMI_MyClass_opMyEnum
{
@@ -239,7 +239,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opMyClassI extends Test.AMI_MyClass_opMyClass
{
@@ -275,7 +275,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opStructI extends Test.AMI_MyClass_opStruct
{
@@ -304,7 +304,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opByteSI extends Test.AMI_MyClass_opByteS
{
@@ -341,7 +341,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opBoolSI extends Test.AMI_MyClass_opBoolS
{
@@ -373,7 +373,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opShortIntLongSI extends Test.AMI_MyClass_opShortIntLongS
{
@@ -417,7 +417,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opFloatDoubleSI extends Test.AMI_MyClass_opFloatDoubleS
{
@@ -453,7 +453,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opStringSI extends Test.AMI_MyClass_opStringS
{
@@ -485,7 +485,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opByteSSI extends Test.AMI_MyClass_opByteSS
{
@@ -527,7 +527,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opBoolSSI extends Test.AMI_MyClass_opBoolSS
{
@@ -550,7 +550,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opShortIntLongSSI extends Test.AMI_MyClass_opShortIntLongSS
{
@@ -573,7 +573,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opFloatDoubleSSI extends Test.AMI_MyClass_opFloatDoubleSS
{
@@ -616,7 +616,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opStringSSI extends Test.AMI_MyClass_opStringSS
{
@@ -654,7 +654,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opByteBoolDI extends Test.AMI_MyClass_opByteBoolD
{
@@ -686,7 +686,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opShortIntDI extends Test.AMI_MyClass_opShortIntD
{
@@ -718,7 +718,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opLongFloatDI extends Test.AMI_MyClass_opLongFloatD
{
@@ -750,7 +750,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opStringStringDI extends Test.AMI_MyClass_opStringStringD
{
@@ -782,7 +782,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opStringMyEnumDI extends Test.AMI_MyClass_opStringMyEnumD
{
@@ -814,7 +814,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opIntSI extends Test.AMI_MyClass_opIntS
{
@@ -848,7 +848,7 @@ class TwowaysAMI
private int _l;
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opContextEqualI extends Test.AMI_MyClass_opContext
{
@@ -878,7 +878,7 @@ class TwowaysAMI
private java.util.Map _d;
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyClass_opContextNotEqualI extends Test.AMI_MyClass_opContext
{
@@ -908,7 +908,7 @@ class TwowaysAMI
private java.util.Map _d;
private Callback callback = new Callback();
- };
+ }
private static class AMI_MyDerivedClass_opDerivedI extends Test.AMI_MyDerivedClass_opDerived
{
@@ -931,7 +931,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
- };
+ }
static void
twowaysAMI(Test.MyClassPrx p)
@@ -1014,14 +1014,14 @@ class TwowaysAMI
(byte)0x11,
(byte)0x12,
(byte)0x22
- };
+ }
final byte[] bsi2 =
{
(byte)0xf1,
(byte)0xf2,
(byte)0xf3,
(byte)0xf4
- };
+ }
AMI_MyClass_opByteSI cb = new AMI_MyClass_opByteSI();
p.opByteS_async(cb, bsi1, bsi2);
@@ -1029,8 +1029,8 @@ class TwowaysAMI
}
{
- final boolean[] bsi1 = { true, true, false };
- final boolean[] bsi2 = { false };
+ final boolean[] bsi1 = { true, true, false }
+ final boolean[] bsi2 = { false }
AMI_MyClass_opBoolSI cb = new AMI_MyClass_opBoolSI();
p.opBoolS_async(cb, bsi1, bsi2);
@@ -1038,9 +1038,9 @@ class TwowaysAMI
}
{
- final short[] ssi = { 1, 2, 3 };
- final int[] isi = { 5, 6, 7, 8 };
- final long[] lsi = { 10, 30, 20 };
+ final short[] ssi = { 1, 2, 3 }
+ final int[] isi = { 5, 6, 7, 8 }
+ final long[] lsi = { 10, 30, 20 }
AMI_MyClass_opShortIntLongSI cb = new AMI_MyClass_opShortIntLongSI();
p.opShortIntLongS_async(cb, ssi, isi, lsi);
@@ -1048,8 +1048,8 @@ class TwowaysAMI
}
{
- final float[] fsi = { 3.14f, 1.11f };
- final double[] dsi = { 1.1E10, 1.2E10, 1.3E10 };
+ final float[] fsi = { 3.14f, 1.11f }
+ final double[] dsi = { 1.1E10, 1.2E10, 1.3E10 }
AMI_MyClass_opFloatDoubleSI cb = new AMI_MyClass_opFloatDoubleSI();
p.opFloatDoubleS_async(cb, fsi, dsi);
@@ -1057,8 +1057,8 @@ class TwowaysAMI
}
{
- final String[] ssi1 = { "abc", "de", "fghi" };
- final String[] ssi2 = { "xyz" };
+ final String[] ssi1 = { "abc", "de", "fghi" }
+ final String[] ssi2 = { "xyz" }
AMI_MyClass_opStringSI cb = new AMI_MyClass_opStringSI();
p.opStringS_async(cb, ssi1, ssi2);
@@ -1070,12 +1070,12 @@ class TwowaysAMI
{
{ (byte)0x01, (byte)0x11, (byte)0x12 },
{ (byte)0xff }
- };
+ }
final byte[][] bsi2 =
{
{ (byte)0x0e },
{ (byte)0xf2, (byte)0xf1 }
- };
+ }
AMI_MyClass_opByteSSI cb = new AMI_MyClass_opByteSSI();
p.opByteSS_async(cb, bsi1, bsi2);
@@ -1088,11 +1088,11 @@ class TwowaysAMI
{ 3.14f },
{ 1.11f },
{ },
- };
+ }
final double[][] dsi =
{
{ 1.1E10, 1.2E10, 1.3E10 }
- };
+ }
AMI_MyClass_opFloatDoubleSSI cb = new AMI_MyClass_opFloatDoubleSSI();
p.opFloatDoubleSS_async(cb, fsi, dsi);
@@ -1104,13 +1104,13 @@ class TwowaysAMI
{
{ "abc" },
{ "de", "fghi" }
- };
+ }
final String[][] ssi2 =
{
{ },
{ },
{ "xyz" }
- };
+ }
AMI_MyClass_opStringSSI cb = new AMI_MyClass_opStringSSI();
p.opStringSS_async(cb, ssi1, ssi2);
@@ -1188,7 +1188,7 @@ class TwowaysAMI
}
{
- int[] lengths = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
+ int[] lengths = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 }
for(int l = 0; l < lengths.length; ++l)
{
@@ -1242,4 +1242,4 @@ class TwowaysAMI
test(cb.check());
}
}
-};
+}
diff --git a/java/test/Ice/operationsAMD/MyDerivedClassI.java b/java/test/Ice/operationsAMD/MyDerivedClassI.java
index e5c3d7280ea..1cbe9d74664 100644
--- a/java/test/Ice/operationsAMD/MyDerivedClassI.java
+++ b/java/test/Ice/operationsAMD/MyDerivedClassI.java
@@ -29,7 +29,7 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
}
private Test.AMD_MyClass_opVoid _cb;
- };
+ }
public
MyDerivedClassI(Ice.ObjectAdapter adapter, Ice.Identity identity)
diff --git a/java/test/Ice/slicing/build.xml b/java/test/Ice/slicing/build.xml
index 13f56040963..7c8b1e9eb41 100644
--- a/java/test/Ice/slicing/build.xml
+++ b/java/test/Ice/slicing/build.xml
@@ -15,11 +15,13 @@ the Free Software Foundation.
<target name="all">
<ant dir="exceptions"/>
+ <ant dir="exceptionsAMD"/>
<ant dir="objects"/>
</target>
<target name="clean">
<ant dir="exceptions" target="clean"/>
+ <ant dir="exceptionsAMD" target="clean"/>
<ant dir="objects" target="clean"/>
</target>
diff --git a/java/test/Ice/slicing/exceptions/Test.ice b/java/test/Ice/slicing/exceptions/Test.ice
index 27b2aa99bd8..cb42aa4d87c 100644
--- a/java/test/Ice/slicing/exceptions/Test.ice
+++ b/java/test/Ice/slicing/exceptions/Test.ice
@@ -35,7 +35,7 @@ exception KnownMostDerived extends KnownIntermediate
string kmd;
};
-interface Test
+["ami"] interface Test
{
void baseAsBase() throws Base;
void unknownDerivedAsBase() throws Base;
@@ -45,7 +45,7 @@ interface Test
void unknownIntermediateAsBase() throws Base;
void knownIntermediateAsBase() throws Base;
void knownMostDerivedAsBase() throws Base;
- void knownIntermediateAsknownIntermediate() throws KnownIntermediate;
+ void knownIntermediateAsKnownIntermediate() throws KnownIntermediate;
void knownMostDerivedAsKnownIntermediate() throws KnownIntermediate;
void knownMostDerivedAsKnownMostDerived() throws KnownMostDerived;
diff --git a/java/test/Ice/slicing/exceptions/csrc/AllTests.java b/java/test/Ice/slicing/exceptions/csrc/AllTests.java
index c35685e5a5e..db5758944cf 100644
--- a/java/test/Ice/slicing/exceptions/csrc/AllTests.java
+++ b/java/test/Ice/slicing/exceptions/csrc/AllTests.java
@@ -23,6 +23,610 @@ public class AllTests
}
}
+ private static class Callback
+ {
+ Callback()
+ {
+ _called = false;
+ }
+
+ public synchronized boolean
+ check()
+ {
+ while(!_called)
+ {
+ try
+ {
+ wait(5000);
+ }
+ catch(InterruptedException ex)
+ {
+ continue;
+ }
+
+ if(!_called)
+ {
+ return false; // Must be timeout.
+ }
+ }
+
+ _called = false;
+ return true;
+ }
+
+ public synchronized void
+ called()
+ {
+ assert(!_called);
+ _called = true;
+ notify();
+ }
+
+ private boolean _called;
+ }
+
+ private static class AMI_Test_baseAsBaseI extends AMI_Test_baseAsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(Base b)
+ {
+ test(b.b.equals("Base.b"));
+ test(b.ice_name().equals("Base"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_unknownDerivedAsBaseI extends AMI_Test_unknownDerivedAsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(Base b)
+ {
+ test(b.b.equals("UnknownDerived.b"));
+ test(b.ice_name().equals("Base"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_knownDerivedAsBaseI extends AMI_Test_knownDerivedAsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownDerived k)
+ {
+ test(k.b.equals("KnownDerived.b"));
+ test(k.kd.equals("KnownDerived.kd"));
+ test(k.ice_name().equals("KnownDerived"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_knownDerivedAsKnownDerivedI extends AMI_Test_knownDerivedAsKnownDerived
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownDerived k)
+ {
+ test(k.b.equals("KnownDerived.b"));
+ test(k.kd.equals("KnownDerived.kd"));
+ test(k.ice_name().equals("KnownDerived"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_unknownIntermediateAsBaseI extends AMI_Test_unknownIntermediateAsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(Base b)
+ {
+ test(b.b.equals("UnknownIntermediate.b"));
+ test(b.ice_name().equals("Base"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_knownIntermediateAsBaseI extends AMI_Test_knownIntermediateAsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownIntermediate ki)
+ {
+ test(ki.b.equals("KnownIntermediate.b"));
+ test(ki.ki.equals("KnownIntermediate.ki"));
+ test(ki.ice_name().equals("KnownIntermediate"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_knownMostDerivedAsBaseI extends AMI_Test_knownMostDerivedAsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownMostDerived kmd)
+ {
+ test(kmd.b.equals("KnownMostDerived.b"));
+ test(kmd.ki.equals("KnownMostDerived.ki"));
+ test(kmd.kmd.equals("KnownMostDerived.kmd"));
+ test(kmd.ice_name().equals("KnownMostDerived"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_knownIntermediateAsKnownIntermediateI
+ extends AMI_Test_knownIntermediateAsKnownIntermediate
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownIntermediate ki)
+ {
+ test(ki.b.equals("KnownIntermediate.b"));
+ test(ki.ki.equals("KnownIntermediate.ki"));
+ test(ki.ice_name().equals("KnownIntermediate"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_knownMostDerivedAsKnownIntermediateI
+ extends AMI_Test_knownMostDerivedAsKnownIntermediate
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownMostDerived kmd)
+ {
+ test(kmd.b.equals("KnownMostDerived.b"));
+ test(kmd.ki.equals("KnownMostDerived.ki"));
+ test(kmd.kmd.equals("KnownMostDerived.kmd"));
+ test(kmd.ice_name().equals("KnownMostDerived"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_knownMostDerivedAsKnownMostDerivedI
+ extends AMI_Test_knownMostDerivedAsKnownMostDerived
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownMostDerived kmd)
+ {
+ test(kmd.b.equals("KnownMostDerived.b"));
+ test(kmd.ki.equals("KnownMostDerived.ki"));
+ test(kmd.kmd.equals("KnownMostDerived.kmd"));
+ test(kmd.ice_name().equals("KnownMostDerived"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_unknownMostDerived1AsBaseI extends AMI_Test_unknownMostDerived1AsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownIntermediate ki)
+ {
+ test(ki.b.equals("UnknownMostDerived1.b"));
+ test(ki.ki.equals("UnknownMostDerived1.ki"));
+ test(ki.ice_name().equals("KnownIntermediate"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_unknownMostDerived1AsKnownIntermediateI
+ extends AMI_Test_unknownMostDerived1AsKnownIntermediate
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(KnownIntermediate ki)
+ {
+ test(ki.b.equals("UnknownMostDerived1.b"));
+ test(ki.ki.equals("UnknownMostDerived1.ki"));
+ test(ki.ice_name().equals("KnownIntermediate"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
+ private static class AMI_Test_unknownMostDerived2AsBaseI extends AMI_Test_unknownMostDerived2AsBase
+ {
+ public void
+ ice_response()
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.LocalException exc)
+ {
+ test(false);
+ }
+
+ public void
+ ice_exception(Ice.UserException exc)
+ {
+ try
+ {
+ throw exc;
+ }
+ catch(Base b)
+ {
+ test(b.b.equals("UnknownMostDerived2.b"));
+ test(b.ice_name().equals("Base"));
+ }
+ catch(Exception ex)
+ {
+ test(false);
+ }
+ callback.called();
+ }
+
+ public boolean
+ check()
+ {
+ return callback.check();
+ }
+
+ private Callback callback = new Callback();
+ }
+
public static TestPrx
allTests(Ice.Communicator communicator, boolean collocated)
{
@@ -40,7 +644,7 @@ public class AllTests
test(test.equals(base));
System.out.println("ok");
- System.out.print("testing throwing a base exception... ");
+ System.out.print("base... ");
System.out.flush();
{
boolean gotException = false;
@@ -62,7 +666,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing slicing of unknown derived exception... ");
+ System.out.print("base (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_baseAsBaseI cb = new AMI_Test_baseAsBaseI();
+ test.baseAsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("slicing of unknown derived... ");
System.out.flush();
{
boolean gotException = false;
@@ -84,7 +697,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing non-slicing of known derived exception thrown as base exception... ");
+ System.out.print("slicing of unknown derived (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_unknownDerivedAsBaseI cb = new AMI_Test_unknownDerivedAsBaseI();
+ test.unknownDerivedAsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("non-slicing of known derived as base... ");
System.out.flush();
{
boolean gotException = false;
@@ -107,7 +729,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing non-slicing of known derived exception thrown as derived exception... ");
+ System.out.print("non-slicing of known derived as base (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_knownDerivedAsBaseI cb = new AMI_Test_knownDerivedAsBaseI();
+ test.knownDerivedAsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("non-slicing of known derived as derived... ");
System.out.flush();
{
boolean gotException = false;
@@ -130,7 +761,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing slicing of unknown intermediate exception thrown as base exception... ");
+ System.out.print("non-slicing of known derived as derived (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_knownDerivedAsKnownDerivedI cb = new AMI_Test_knownDerivedAsKnownDerivedI();
+ test.knownDerivedAsKnownDerived_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("slicing of unknown intermediate as base... ");
System.out.flush();
{
boolean gotException = false;
@@ -152,7 +792,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing slicing of known intermediate exception thrown as base exception... ");
+ System.out.print("slicing of unknown intermediate as base (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_unknownIntermediateAsBaseI cb = new AMI_Test_unknownIntermediateAsBaseI();
+ test.unknownIntermediateAsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("slicing of known intermediate as base... ");
System.out.flush();
{
boolean gotException = false;
@@ -175,7 +824,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing slicing of known most derived exception thrown as base exception... ");
+ System.out.print("slicing of known intermediate as base (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_knownIntermediateAsBaseI cb = new AMI_Test_knownIntermediateAsBaseI();
+ test.knownIntermediateAsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("slicing of known most derived as base... ");
System.out.flush();
{
boolean gotException = false;
@@ -199,13 +857,22 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing non-slicing of known intermediate exception thrown as intermediate exception... ");
+ System.out.print("slicing of known most derived as base (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_knownMostDerivedAsBaseI cb = new AMI_Test_knownMostDerivedAsBaseI();
+ test.knownMostDerivedAsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("non-slicing of known intermediate as intermediate... ");
System.out.flush();
{
boolean gotException = false;
try
{
- test.knownIntermediateAsknownIntermediate();
+ test.knownIntermediateAsKnownIntermediate();
}
catch(KnownIntermediate ki)
{
@@ -222,7 +889,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing non-slicing of known most derived thrown as intermediate exception... ");
+ System.out.print("non-slicing of known intermediate as intermediate (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_knownIntermediateAsKnownIntermediateI cb = new AMI_Test_knownIntermediateAsKnownIntermediateI();
+ test.knownIntermediateAsKnownIntermediate_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("non-slicing of known most derived as intermediate... ");
System.out.flush();
{
boolean gotException = false;
@@ -246,7 +922,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing non-slicing of known most derived thrown as most derived exception... ");
+ System.out.print("non-slicing of known most derived as intermediate (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_knownMostDerivedAsKnownIntermediateI cb = new AMI_Test_knownMostDerivedAsKnownIntermediateI();
+ test.knownMostDerivedAsKnownIntermediate_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("non-slicing of known most derived as most derived... ");
System.out.flush();
{
boolean gotException = false;
@@ -270,7 +955,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing slicing of unknown most derived with known intermediate thrown as base exception... ");
+ System.out.print("non-slicing of known most derived as most derived (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_knownMostDerivedAsKnownMostDerivedI cb = new AMI_Test_knownMostDerivedAsKnownMostDerivedI();
+ test.knownMostDerivedAsKnownMostDerived_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("slicing of unknown most derived, known intermediate as base... ");
System.out.flush();
{
boolean gotException = false;
@@ -293,7 +987,16 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing slicing of unknown most derived with known intermediate thrown as intermediate exception... ");
+ System.out.print("slicing of unknown most derived, known intermediate as base (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_unknownMostDerived1AsBaseI cb = new AMI_Test_unknownMostDerived1AsBaseI();
+ test.unknownMostDerived1AsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("slicing of unknown most derived, known intermediate as intermediate... ");
System.out.flush();
{
boolean gotException = false;
@@ -316,7 +1019,17 @@ public class AllTests
}
System.out.println("ok");
- System.out.print("testing slicing of unknown most derived with unknown intermediate thrown as base exception... ");
+ System.out.print("slicing of unknown most derived, known intermediate as intermediate (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_unknownMostDerived1AsKnownIntermediateI cb =
+ new AMI_Test_unknownMostDerived1AsKnownIntermediateI();
+ test.unknownMostDerived1AsKnownIntermediate_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
+ System.out.print("slicing of unknown most derived, unknown intermediate thrown as base... ");
System.out.flush();
{
boolean gotException = false;
@@ -338,6 +1051,15 @@ public class AllTests
}
System.out.println("ok");
+ System.out.print("slicing of unknown most derived, unknown intermediate thrown as base (AMI)... ");
+ System.out.flush();
+ {
+ AMI_Test_unknownMostDerived2AsBaseI cb = new AMI_Test_unknownMostDerived2AsBaseI();
+ test.unknownMostDerived2AsBase_async(cb);
+ test(cb.check());
+ }
+ System.out.println("ok");
+
return test;
}
}
diff --git a/java/test/Ice/slicing/exceptions/run.py b/java/test/Ice/slicing/exceptions/run.py
index 94ace071e25..ed558bf0436 100755
--- a/java/test/Ice/slicing/exceptions/run.py
+++ b/java/test/Ice/slicing/exceptions/run.py
@@ -27,7 +27,31 @@ import TestUtil
name = os.path.join("Ice", "slicing", "exceptions")
testdir = os.path.join(toplevel, "test", name)
+nameAMD = os.path.join("Ice", "slicing", "exceptionsAMD")
+testdirAMD = os.path.join(toplevel, "test", nameAMD)
+print "tests with regular server."
TestUtil.clientServerTestWithClasspath(os.path.join(testdir, "sclasses"), os.path.join(testdir, "cclasses"))
+print "tests with AMD server."
+server = "java -ea Server --Ice.ProgramName=Server "
+client = "java -ea Client --Ice.ProgramName=Client "
+print "starting server...",
+cp = os.getenv("CLASSPATH", "")
+os.environ["CLASSPATH"] = os.path.join(testdirAMD, "classes") + TestUtil.sep + cp
+serverPipe = os.popen(server + TestUtil.serverOptions)
+TestUtil.getAdapterReady(serverPipe)
+print "ok"
+print "starting client...",
+os.environ["CLASSPATH"] = cp
+os.environ["CLASSPATH"] = os.path.join(testdir, "cclasses") + TestUtil.sep + cp
+clientPipe = os.popen(client + TestUtil.clientOptions)
+print "ok"
+TestUtil.printOutputFromPipe(clientPipe)
+clientStatus = clientPipe.close()
+serverStatus = serverPipe.close()
+if clientStatus or serverStatus:
+ TestUtil.killServers()
+ sys.exit(1)
+
sys.exit(0)
diff --git a/java/test/Ice/slicing/exceptions/ssrc/TestI.java b/java/test/Ice/slicing/exceptions/ssrc/TestI.java
index 86eb89f5885..975194642d3 100644
--- a/java/test/Ice/slicing/exceptions/ssrc/TestI.java
+++ b/java/test/Ice/slicing/exceptions/ssrc/TestI.java
@@ -97,7 +97,7 @@ public final class TestI extends _TestDisp
}
public void
- knownIntermediateAsknownIntermediate(Ice.Current current)
+ knownIntermediateAsKnownIntermediate(Ice.Current current)
throws KnownIntermediate
{
KnownIntermediate ki = new KnownIntermediate();
diff --git a/java/test/Ice/slicing/exceptionsAMD/ServerPrivateAMD.ice b/java/test/Ice/slicing/exceptionsAMD/ServerPrivateAMD.ice
new file mode 100644
index 00000000000..074b2b474b8
--- /dev/null
+++ b/java/test/Ice/slicing/exceptionsAMD/ServerPrivateAMD.ice
@@ -0,0 +1,40 @@
+// **********************************************************************
+//
+// Copyright (c) 2003
+// ZeroC, Inc.
+// Billerica, MA, USA
+//
+// All Rights Reserved.
+//
+// Ice is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// **********************************************************************
+
+#ifndef SERVERPRIVATE_AMD_ICE
+#define SERVERPRIVATE_AMD_ICE
+
+#include <TestAMD.ice>
+
+exception UnknownDerived extends Base
+{
+ string ud;
+};
+
+exception UnknownIntermediate extends Base
+{
+ string ui;
+};
+
+exception UnknownMostDerived1 extends KnownIntermediate
+{
+ string umd1;
+};
+
+exception UnknownMostDerived2 extends UnknownIntermediate
+{
+ string umd2;
+};
+
+#endif
diff --git a/java/test/Ice/slicing/exceptionsAMD/TestAMD.ice b/java/test/Ice/slicing/exceptionsAMD/TestAMD.ice
new file mode 100644
index 00000000000..f8dec1fd04e
--- /dev/null
+++ b/java/test/Ice/slicing/exceptionsAMD/TestAMD.ice
@@ -0,0 +1,59 @@
+// **********************************************************************
+//
+// Copyright (c) 2003
+// ZeroC, Inc.
+// Billerica, MA, USA
+//
+// All Rights Reserved.
+//
+// Ice is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// **********************************************************************
+
+#ifndef TEST_AMD_ICE
+#define TEST_AMD_ICE
+
+exception Base
+{
+ string b;
+};
+
+exception KnownDerived extends Base
+{
+ string kd;
+};
+
+exception KnownIntermediate extends Base
+{
+ string ki;
+};
+
+exception KnownMostDerived extends KnownIntermediate
+{
+ string kmd;
+};
+
+["ami", "amd"] interface Test
+{
+ void baseAsBase() throws Base;
+ void unknownDerivedAsBase() throws Base;
+ void knownDerivedAsBase() throws Base;
+ void knownDerivedAsKnownDerived() throws KnownDerived;
+
+ void unknownIntermediateAsBase() throws Base;
+ void knownIntermediateAsBase() throws Base;
+ void knownMostDerivedAsBase() throws Base;
+ void knownIntermediateAsKnownIntermediate() throws KnownIntermediate;
+ void knownMostDerivedAsKnownIntermediate() throws KnownIntermediate;
+ void knownMostDerivedAsKnownMostDerived() throws KnownMostDerived;
+
+ void unknownMostDerived1AsBase() throws Base;
+ void unknownMostDerived1AsKnownIntermediate() throws KnownIntermediate;
+ void unknownMostDerived2AsBase() throws Base;
+
+ void shutdown();
+};
+
+#endif
diff --git a/java/test/Ice/slicing/exceptionsAMD/TestI.java b/java/test/Ice/slicing/exceptionsAMD/TestI.java
new file mode 100644
index 00000000000..35b4f6aae4d
--- /dev/null
+++ b/java/test/Ice/slicing/exceptionsAMD/TestI.java
@@ -0,0 +1,166 @@
+// **********************************************************************
+//
+// Copyright (c) 2003
+// ZeroC, Inc.
+// Billerica, MA, USA
+//
+// All Rights Reserved.
+//
+// Ice is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// **********************************************************************
+
+public final class TestI extends _TestDisp
+{
+ public
+ TestI(Ice.ObjectAdapter adapter)
+ {
+ _adapter = adapter;
+ }
+
+ public void
+ shutdown_async(AMD_Test_shutdown cb, Ice.Current current)
+ {
+ _adapter.getCommunicator().shutdown();
+ cb.ice_response();
+ }
+
+ public void
+ baseAsBase_async(AMD_Test_baseAsBase cb, Ice.Current current)
+ throws Base
+ {
+ Base b = new Base();
+ b.b = "Base.b";
+ cb.ice_exception(b);
+ }
+
+ public void
+ unknownDerivedAsBase_async(AMD_Test_unknownDerivedAsBase cb, Ice.Current current)
+ throws Base
+ {
+ UnknownDerived d = new UnknownDerived();
+ d.b = "UnknownDerived.b";
+ d.ud = "UnknownDerived.ud";
+ cb.ice_exception(d);
+ }
+
+ public void
+ knownDerivedAsBase_async(AMD_Test_knownDerivedAsBase cb, Ice.Current current)
+ throws Base
+ {
+ KnownDerived d = new KnownDerived();
+ d.b = "KnownDerived.b";
+ d.kd = "KnownDerived.kd";
+ cb.ice_exception(d);
+ }
+
+ public void
+ knownDerivedAsKnownDerived_async(AMD_Test_knownDerivedAsKnownDerived cb, Ice.Current current)
+ throws KnownDerived
+ {
+ KnownDerived d = new KnownDerived();
+ d.b = "KnownDerived.b";
+ d.kd = "KnownDerived.kd";
+ cb.ice_exception(d);
+ }
+
+ public void
+ unknownIntermediateAsBase_async(AMD_Test_unknownIntermediateAsBase cb, Ice.Current current)
+ throws Base
+ {
+ UnknownIntermediate ui = new UnknownIntermediate();
+ ui.b = "UnknownIntermediate.b";
+ ui.ui = "UnknownIntermediate.ui";
+ cb.ice_exception(ui);
+ }
+
+ public void
+ knownIntermediateAsBase_async(AMD_Test_knownIntermediateAsBase cb, Ice.Current current)
+ throws Base
+ {
+ KnownIntermediate ki = new KnownIntermediate();
+ ki.b = "KnownIntermediate.b";
+ ki.ki = "KnownIntermediate.ki";
+ cb.ice_exception(ki);
+ }
+
+ public void
+ knownMostDerivedAsBase_async(AMD_Test_knownMostDerivedAsBase cb, Ice.Current current)
+ throws Base
+ {
+ KnownMostDerived kmd = new KnownMostDerived();
+ kmd.b = "KnownMostDerived.b";
+ kmd.ki = "KnownMostDerived.ki";
+ kmd.kmd = "KnownMostDerived.kmd";
+ cb.ice_exception(kmd);
+ }
+
+ public void
+ knownIntermediateAsKnownIntermediate_async(AMD_Test_knownIntermediateAsKnownIntermediate cb, Ice.Current current)
+ throws KnownIntermediate
+ {
+ KnownIntermediate ki = new KnownIntermediate();
+ ki.b = "KnownIntermediate.b";
+ ki.ki = "KnownIntermediate.ki";
+ cb.ice_exception(ki);
+ }
+
+ public void
+ knownMostDerivedAsKnownIntermediate_async(AMD_Test_knownMostDerivedAsKnownIntermediate cb, Ice.Current current)
+ throws KnownIntermediate
+ {
+ KnownMostDerived kmd = new KnownMostDerived();
+ kmd.b = "KnownMostDerived.b";
+ kmd.ki = "KnownMostDerived.ki";
+ kmd.kmd = "KnownMostDerived.kmd";
+ cb.ice_exception(kmd);
+ }
+
+ public void
+ knownMostDerivedAsKnownMostDerived_async(AMD_Test_knownMostDerivedAsKnownMostDerived cb, Ice.Current current)
+ throws KnownMostDerived
+ {
+ KnownMostDerived kmd = new KnownMostDerived();
+ kmd.b = "KnownMostDerived.b";
+ kmd.ki = "KnownMostDerived.ki";
+ kmd.kmd = "KnownMostDerived.kmd";
+ cb.ice_exception(kmd);
+ }
+
+ public void
+ unknownMostDerived1AsBase_async(AMD_Test_unknownMostDerived1AsBase cb, Ice.Current current)
+ throws Base
+ {
+ UnknownMostDerived1 umd1 = new UnknownMostDerived1();
+ umd1.b = "UnknownMostDerived1.b";
+ umd1.ki = "UnknownMostDerived1.ki";
+ umd1.umd1 = "UnknownMostDerived1.umd1";
+ cb.ice_exception(umd1);
+ }
+
+ public void
+ unknownMostDerived1AsKnownIntermediate_async(AMD_Test_unknownMostDerived1AsKnownIntermediate cb,
+ Ice.Current current)
+ throws KnownIntermediate
+ {
+ UnknownMostDerived1 umd1 = new UnknownMostDerived1();
+ umd1.b = "UnknownMostDerived1.b";
+ umd1.ki = "UnknownMostDerived1.ki";
+ umd1.umd1 = "UnknownMostDerived1.umd1";
+ cb.ice_exception(umd1);
+ }
+
+ public void
+ unknownMostDerived2AsBase_async(AMD_Test_unknownMostDerived2AsBase cb, Ice.Current current)
+ throws Base
+ {
+ UnknownMostDerived2 umd2 = new UnknownMostDerived2();
+ umd2.b = "UnknownMostDerived2.b";
+ umd2.ui = "UnknownMostDerived2.ui";
+ umd2.umd2 = "UnknownMostDerived2.umd2";
+ cb.ice_exception(umd2);
+ }
+ private Ice.ObjectAdapter _adapter;
+}
diff --git a/java/test/Ice/slicing/exceptionsAMD/build.xml b/java/test/Ice/slicing/exceptionsAMD/build.xml
new file mode 100644
index 00000000000..e298857452a
--- /dev/null
+++ b/java/test/Ice/slicing/exceptionsAMD/build.xml
@@ -0,0 +1,61 @@
+<!--
+
+Copyright (c) 2003
+ZeroC, Inc.
+Billerica, MA, USA
+
+All Rights Reserved.
+
+Ice is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License version 2 as published by
+the Free Software Foundation.
+
+-->
+<project name="test_Ice_slicing_exceptionsAMD" default="all" basedir=".">
+
+ <!-- set global properties for this build -->
+ <property name="top.dir" value="../../../.."/>
+ <property name="lib.dir" value="${top.dir}/lib"/>
+ <property name="class.dir" value="classes"/>
+ <property name="generated.dir" value="generated"/>
+
+ <!-- set common build properties for this build -->
+ <property file="${top.dir}/config/build.properties"/>
+
+ <!-- install slice2java task -->
+ <taskdef name="slice2java" classpath="${top.dir}/ant"
+ classname="Slice2JavaTask" />
+
+ <target name="init">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ </target>
+
+ <target name="generate" depends="init">
+ <!-- Create the output directory for generated code -->
+ <mkdir dir="${generated.dir}"/>
+ <slice2java outputdir="${generated.dir}">
+ <includepath>
+ <pathelement path="."/>
+ </includepath>
+ <fileset dir="." includes="TestAMD.ice"/>
+ <fileset dir="." includes="ServerPrivateAMD.ice"/>
+ </slice2java>
+ </target>
+
+ <target name="compile" depends="generate">
+ <mkdir dir="${class.dir}"/>
+ <javac srcdir="${generated.dir}" destdir="${class.dir}"
+ source="1.4" classpath="${lib.dir}" debug="${debug}"/>
+ <javac srcdir="." destdir="${class.dir}" source="1.4"
+ classpath="${lib.dir}" excludes="generated/**" debug="${debug}"/>
+ </target>
+
+ <target name="all" depends="compile"/>
+
+ <target name="clean">
+ <delete dir="${generated.dir}"/>
+ <delete dir="${class.dir}"/>
+ </target>
+
+</project>