diff options
author | Kyle Galloway <kgallowa@redhat.com> | 2007-02-28 14:42:37 +0000 |
---|---|---|
committer | Kyle Galloway <kgallowa@redhat.com> | 2007-02-28 14:42:37 +0000 |
commit | 8ac19708cb86b3f458b75caf8c120cbbec889902 (patch) | |
tree | ceaa5b4310f91b63bb0d5d9bd7eb784b30b8d865 /vm | |
parent | 0478d2150641970c8cde13d2560290445417b2a4 (diff) | |
download | classpath-8ac19708cb86b3f458b75caf8c120cbbec889902.tar.gz |
2007-02-28 Kyle Galloway <kgallowa@redhat.com>
* gnu/classpath/jdwp/id/NullObjectId.java: New class.
* gnu/classpath/jdwp/util/NullObject.java: New class.
* vm/reference/gnu/classpath/jdwp/VMIdManager.java
(getObjectId): Handle null object.
(get): Handle objectId of 0.
Diffstat (limited to 'vm')
-rw-r--r-- | vm/reference/gnu/classpath/jdwp/VMIdManager.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vm/reference/gnu/classpath/jdwp/VMIdManager.java b/vm/reference/gnu/classpath/jdwp/VMIdManager.java index 8d423e9b0..9360e764d 100644 --- a/vm/reference/gnu/classpath/jdwp/VMIdManager.java +++ b/vm/reference/gnu/classpath/jdwp/VMIdManager.java @@ -337,6 +337,10 @@ public class VMIdManager */ public ObjectId getObjectId (Object theObject) { + // Special case: null + if (theObject == null) + return new NullObjectId (); + ReferenceKey ref = new ReferenceKey (theObject, _refQueue); ObjectId id = (ObjectId) _oidTable.get (ref); if (id == null) @@ -364,6 +368,10 @@ public class VMIdManager public ObjectId get (long id) throws InvalidObjectException { + // Special case: null + if (id == 0) + return new NullObjectId (); + ObjectId oid = (ObjectId) _idTable.get (new Long (id)); if (oid == null) throw new InvalidObjectException (id); |