diff options
-rw-r--r-- | cpp/test/Ice/proxy/AllTests.cpp | 1 | ||||
-rw-r--r-- | csharp/test/Ice/proxy/AllTests.cs | 1 | ||||
-rw-r--r-- | java-compat/test/src/main/java/test/Ice/proxy/AllTests.java | 1 | ||||
-rw-r--r-- | java/test/src/main/java/test/Ice/proxy/AllTests.java | 1 | ||||
-rw-r--r-- | js/test/Ice/proxy/Client.js | 2 | ||||
-rw-r--r-- | matlab/lib/+Ice/ObjectPrx.m | 6 | ||||
-rw-r--r-- | matlab/test/Ice/proxy/AllTests.m | 2 | ||||
-rw-r--r-- | php/test/Ice/proxy/Client.php | 1 | ||||
-rw-r--r-- | python/test/Ice/proxy/AllTests.py | 1 | ||||
-rw-r--r-- | ruby/test/Ice/proxy/AllTests.rb | 1 |
10 files changed, 16 insertions, 1 deletions
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index a923bf398fb..b5c0d8c2a09 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -1083,6 +1083,7 @@ allTests(Test::TestHelper* helper) test(cl == base); test(derived == base); test(cl == derived); + test(ICE_CHECKED_CAST(Test::MyDerivedClassPrx, cl, "facet") == ICE_NULLPTR); Ice::LocatorPrxPtr loc = ICE_CHECKED_CAST(Ice::LocatorPrx, base); test(loc == 0); diff --git a/csharp/test/Ice/proxy/AllTests.cs b/csharp/test/Ice/proxy/AllTests.cs index c28e31cc7ff..2a337dc47e0 100644 --- a/csharp/test/Ice/proxy/AllTests.cs +++ b/csharp/test/Ice/proxy/AllTests.cs @@ -786,6 +786,7 @@ namespace Ice test(cl.Equals(baseProxy)); test(derived.Equals(baseProxy)); test(cl.Equals(derived)); + test(Test.MyDerivedClassPrxHelper.checkedCast(cl, "facet") == null); output.WriteLine("ok"); output.Write("testing checked cast with context... "); diff --git a/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java b/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java index a94cc224fa2..64e1f427af8 100644 --- a/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java +++ b/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java @@ -808,6 +808,7 @@ public class AllTests test(cl.equals(base)); test(derived.equals(base)); test(cl.equals(derived)); + test(MyDerivedClassPrxHelper.checkedCast(cl, "facet") == null); out.println("ok"); out.print("testing checked cast with context... "); diff --git a/java/test/src/main/java/test/Ice/proxy/AllTests.java b/java/test/src/main/java/test/Ice/proxy/AllTests.java index c1fdd70b899..96d56eee8cd 100644 --- a/java/test/src/main/java/test/Ice/proxy/AllTests.java +++ b/java/test/src/main/java/test/Ice/proxy/AllTests.java @@ -815,6 +815,7 @@ public class AllTests test(cl.equals(base)); test(derived.equals(base)); test(cl.equals(derived)); + test(MyDerivedClassPrx.checkedCast(cl, "facet") == null); out.println("ok"); out.print("testing checked cast with context... "); diff --git a/js/test/Ice/proxy/Client.js b/js/test/Ice/proxy/Client.js index e96681dc8e5..ea395d33685 100644 --- a/js/test/Ice/proxy/Client.js +++ b/js/test/Ice/proxy/Client.js @@ -722,6 +722,8 @@ test(cl.equals(base)); test(derived.equals(base)); test(cl.equals(derived)); + let f = await Test.MyDerivedClassPrx.checkedCast(cl, "facet"); + test(f === null); out.writeLine("ok"); out.write("testing checked cast with context... "); diff --git a/matlab/lib/+Ice/ObjectPrx.m b/matlab/lib/+Ice/ObjectPrx.m index d5b85a74258..d686c46a91e 100644 --- a/matlab/lib/+Ice/ObjectPrx.m +++ b/matlab/lib/+Ice/ObjectPrx.m @@ -1236,7 +1236,11 @@ classdef ObjectPrx < IceInternal.WrapperObject r = p; end catch ex - ex.throwAsCaller(); + if isa(ex, 'Ice.FacetNotExistException') + r = []; + else + ex.throwAsCaller(); + end end end diff --git a/matlab/test/Ice/proxy/AllTests.m b/matlab/test/Ice/proxy/AllTests.m index 09923a53528..4fb9b5dabef 100644 --- a/matlab/test/Ice/proxy/AllTests.m +++ b/matlab/test/Ice/proxy/AllTests.m @@ -646,6 +646,8 @@ classdef AllTests loc = Ice.LocatorPrx.checkedCast(base); assert(isempty(loc)); + assert(isempty(MyClassPrx.checkedCast(cl, 'facet'))); + % % Upcasting % diff --git a/php/test/Ice/proxy/Client.php b/php/test/Ice/proxy/Client.php index a4a7689376f..b33051efbf2 100644 --- a/php/test/Ice/proxy/Client.php +++ b/php/test/Ice/proxy/Client.php @@ -489,6 +489,7 @@ function allTests($helper) test($cl == $base); test($derived == $base); test($cl == $derived); + test($base->ice_checkedCast("::Test::MyClass", "facet") == null); echo "ok\n"; echo "testing checked cast with context... "; diff --git a/python/test/Ice/proxy/AllTests.py b/python/test/Ice/proxy/AllTests.py index e5bc5b9339f..049e1bbadf3 100644 --- a/python/test/Ice/proxy/AllTests.py +++ b/python/test/Ice/proxy/AllTests.py @@ -620,6 +620,7 @@ def allTests(helper, communicator, collocated): test(cl == base) test(derived == base) test(cl == derived) + test(Test.MyDerivedClassPrx.checkedCast(cl, "facet") == None) loc = Ice.LocatorPrx.checkedCast(base) test(loc == None) diff --git a/ruby/test/Ice/proxy/AllTests.rb b/ruby/test/Ice/proxy/AllTests.rb index 3a923e4d0d1..bf8b6634385 100644 --- a/ruby/test/Ice/proxy/AllTests.rb +++ b/ruby/test/Ice/proxy/AllTests.rb @@ -617,6 +617,7 @@ def allTests(helper, communicator) test(cl == base) test(derived == base) test(cl == derived) + test(Test::MyDerivedClassPrx::checkedCast(cl, "facet") == nil) loc = Ice::LocatorPrx::checkedCast(base) test(loc == nil) |