diff options
author | Jose <pepone@users.noreply.github.com> | 2021-01-08 23:44:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 23:44:50 +0100 |
commit | 4419db6dc600b41141c23ede1c6895cbc898e819 (patch) | |
tree | fbb5b3769febe09a7caeb9e709480401515ba684 /java | |
parent | Fix Bogus name for metrics Request Id field - Close #906 (diff) | |
download | ice-4419db6dc600b41141c23ede1c6895cbc898e819.tar.bz2 ice-4419db6dc600b41141c23ede1c6895cbc898e819.tar.xz ice-4419db6dc600b41141c23ede1c6895cbc898e819.zip |
Fix C# marshal/unmarshal of optional data members (#1232)
See #889
Diffstat (limited to 'java')
5 files changed, 12 insertions, 0 deletions
diff --git a/java/test/src/main/java/test/Ice/optional/AMDInitialI.java b/java/test/src/main/java/test/Ice/optional/AMDInitialI.java index 8ce5cce338d..6832ee2ed49 100644 --- a/java/test/src/main/java/test/Ice/optional/AMDInitialI.java +++ b/java/test/src/main/java/test/Ice/optional/AMDInitialI.java @@ -85,6 +85,8 @@ public final class AMDInitialI implements Initial ex.setO(o.get()); ex.setO2(o.get()); } + ex.d1 = "d1"; + ex.d2 = "d2"; CompletableFuture<Void> f = new CompletableFuture<>(); f.completeExceptionally(ex); return f; diff --git a/java/test/src/main/java/test/Ice/optional/AllTests.java b/java/test/src/main/java/test/Ice/optional/AllTests.java index 1b15928b90d..77c6ff48817 100644 --- a/java/test/src/main/java/test/Ice/optional/AllTests.java +++ b/java/test/src/main/java/test/Ice/optional/AllTests.java @@ -2098,6 +2098,8 @@ public class AllTests test(!ex.hasO()); test(!ex.hasSs()); test(!ex.hasO2()); + test(ex.d1.equals("d1")); + test(ex.d2.equals("d2")); } catch(OptionalException ex) { @@ -2118,6 +2120,8 @@ public class AllTests test(ex.getO().getA() == 53); test(ex.getSs().equals("test2")); test(ex.getO2().getA() == 53); + test(ex.d1.equals("d1")); + test(ex.d2.equals("d2")); } catch(OptionalException ex) { diff --git a/java/test/src/main/java/test/Ice/optional/InitialI.java b/java/test/src/main/java/test/Ice/optional/InitialI.java index 251fd129067..270a5cb0cba 100644 --- a/java/test/src/main/java/test/Ice/optional/InitialI.java +++ b/java/test/src/main/java/test/Ice/optional/InitialI.java @@ -78,6 +78,8 @@ public final class InitialI implements Initial ex.setO(o.get()); ex.setO2(o.get()); } + ex.d1 = "d1"; + ex.d2 = "d2"; throw ex; } diff --git a/java/test/src/main/java/test/Ice/optional/Test.ice b/java/test/src/main/java/test/Ice/optional/Test.ice index b84c07d8095..a519d335b35 100644 --- a/java/test/src/main/java/test/Ice/optional/Test.ice +++ b/java/test/src/main/java/test/Ice/optional/Test.ice @@ -140,8 +140,10 @@ exception OptionalException exception DerivedException extends OptionalException { + string d1; optional(600) string ss = "test"; optional(601) OneOptional o2; + string d2; } exception RequiredException extends OptionalException diff --git a/java/test/src/main/java/test/Ice/optional/TestAMD.ice b/java/test/src/main/java/test/Ice/optional/TestAMD.ice index eaa716a9ecf..96c5fb5f7a4 100644 --- a/java/test/src/main/java/test/Ice/optional/TestAMD.ice +++ b/java/test/src/main/java/test/Ice/optional/TestAMD.ice @@ -140,8 +140,10 @@ exception OptionalException exception DerivedException extends OptionalException { + string d1; optional(600) string ss = "test"; optional(601) OneOptional o2; + string d2; } exception RequiredException extends OptionalException |