summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-12-07 00:42:58 +0000
committerMark Spruiell <mes@zeroc.com>2002-12-07 00:42:58 +0000
commitc819b833fb66546ea00246a96dfab2f9def505c4 (patch)
treea212e8707831f25743d802344e494f490b654de8 /cpp
parentAsync visitor now visit the modul if it contains amd metata (copy/paste (diff)
downloadice-c819b833fb66546ea00246a96dfab2f9def505c4.tar.bz2
ice-c819b833fb66546ea00246a96dfab2f9def505c4.tar.xz
ice-c819b833fb66546ea00246a96dfab2f9def505c4.zip
accept null for dictionary when marshalling
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 5c374dc57e8..6066e1d41b0 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -2332,6 +2332,12 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
//
out << nl << "public static void" << nl << "write(IceInternal.BasicStream __os, " << "java.util.Map __v)";
out << sb;
+ out << nl << "if(__v == null)";
+ out << sb;
+ out << nl << "__os.writeSize(0);";
+ out << eb;
+ out << nl << "else";
+ out << sb;
out << nl << "__os.writeSize(__v.size());";
out << nl << "java.util.Iterator __i = __v.entrySet().iterator();";
out << nl << "while(__i.hasNext())";
@@ -2416,6 +2422,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
}
out << eb;
out << eb;
+ out << eb;
//
// read