diff options
author | Michi Henning <michi@zeroc.com> | 2003-05-19 14:38:42 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-05-19 14:38:42 +0000 |
commit | 2193ab182069435ce42105dabd05395d2f256861 (patch) | |
tree | 972780299e83a406959a762c91cd58bd73f0e1fd /java/src/Ice/ObjectImpl.java | |
parent | More changes for icej slicing. (diff) | |
download | ice-2193ab182069435ce42105dabd05395d2f256861.tar.bz2 ice-2193ab182069435ce42105dabd05395d2f256861.tar.xz ice-2193ab182069435ce42105dabd05395d2f256861.zip |
Slicing changes. Tests pass, with the exception of tests that are meant to
show that things actually get sliced. This is most likely because the
test setup is the problem, not the code.
Lots of incomprehensible trace left in the code for now...
Diffstat (limited to 'java/src/Ice/ObjectImpl.java')
-rw-r--r-- | java/src/Ice/ObjectImpl.java | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/java/src/Ice/ObjectImpl.java b/java/src/Ice/ObjectImpl.java index afa5c2639e7..e706207f4d7 100644 --- a/java/src/Ice/ObjectImpl.java +++ b/java/src/Ice/ObjectImpl.java @@ -21,20 +21,6 @@ public class ObjectImpl implements Object, java.lang.Cloneable { } - public boolean - equals(java.lang.Object rhs) - { - try - { - Object r = (Object)rhs; - return this == r; - } - catch(ClassCastException ex) - { - } - return false; - } - public java.lang.Object clone() throws java.lang.CloneNotSupportedException @@ -212,6 +198,8 @@ public class ObjectImpl implements Object, java.lang.Cloneable { synchronized(_activeFacetMap) { + __os.writeTypeId("::Ice::Object"); + __os.startWriteSlice(); final int sz = _activeFacetMap.size(); __os.writeSize(sz); @@ -223,14 +211,38 @@ public class ObjectImpl implements Object, java.lang.Cloneable __os.writeString(keys[i]); __os.writeObject((Object)_activeFacetMap.get(keys[i])); } + __os.endWriteSlice(); } } + private class Patcher implements Ice.Patcher + { + Patcher(String key) + { + __key = key; + } + + public void + patch(Ice.Object v) + { + _activeFacetMap.put(__key, v); + } + + private String __key; + } + public void - __read(IceInternal.BasicStream __is) + __read(IceInternal.BasicStream __is, boolean __rid) { synchronized(_activeFacetMap) { + if(__rid) + { + String myId = __is.readTypeId(); + } + + __is.startReadSlice(); + int sz = __is.readSize(); _activeFacetMap.clear(); @@ -238,9 +250,10 @@ public class ObjectImpl implements Object, java.lang.Cloneable while(sz-- > 0) { String key = __is.readString(); - Object value = __is.readObject("", null); - _activeFacetMap.put(key, value); + __is.readObject(new Patcher(key)); } + + __is.endReadSlice(); } } |