Fix JDWP IsCollected command handling.

Update the handling of the JDWP IsCollected command for 'null' object id and
invalid object id.

We follow the RI where 'null' object id triggers an INVALID_OBEJCT error but
an invalid object id does not trigger error and return 'true' result.

Also fix handling of 'null' object id to avoid confusion with valid object id.
We used to rely on ObjectRegistry::Get returning NULL to detect null object id
(in which case we return an INVALID_OBJECT error). The issue is this method
may also return NULL for a valid object id if the corresponding object has
been collected. In this case, we must not return any JDWP error and the result
of the command should be 'true' meaning the object identified by the given id
has been collected.

Bug: 12221035
Change-Id: I013f3759bac7cf5b1e9ee3e8c0d1bb2a11f1b654
1 file changed