diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-12-07 00:42:58 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-12-07 00:42:58 +0000 |
commit | c819b833fb66546ea00246a96dfab2f9def505c4 (patch) | |
tree | a212e8707831f25743d802344e494f490b654de8 /cpp/src/slice2java | |
parent | Async visitor now visit the modul if it contains amd metata (copy/paste (diff) | |
download | ice-c819b833fb66546ea00246a96dfab2f9def505c4.tar.bz2 ice-c819b833fb66546ea00246a96dfab2f9def505c4.tar.xz ice-c819b833fb66546ea00246a96dfab2f9def505c4.zip |
accept null for dictionary when marshalling
Diffstat (limited to 'cpp/src/slice2java')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 7 |
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 |