Issue1264
Created on 2009-02-21.22:35:47 by MrMeanie, last changed 2009-04-05.18:37:08 by fwierzbicki.
msg4151 (view) |
Author: Geoffrey French (MrMeanie) |
Date: 2009-02-21.22:35:46 |
|
The 'is not' test exhibits incorrect behavior when wrapping Java objects.
Please find attached a zip containing a java source file to compile, and
a python unittest to run.
It checks that the identity comparison functions work as they should.
The particular issue that is uncovered here occurs when:
The test works by creating a IdentityTestObject().
Its 'getThis()' method is invoked, which returns itself.
This results in this object getting wrapped twice by Jython; the
underlying Java object is identical, but the wrappers are different.
The 'is' check works fine, in that it results in True.
However, the 'is not' check fails, also resulting in True.
|
msg4152 (view) |
Author: Geoffrey French (MrMeanie) |
Date: 2009-02-21.23:00:14 |
|
Please find attached a patch that modifies the PyObject._isnot() method.
Provided that my understanding of the usage of the 'javaProxy' field is
correct, this patch should be fine.
(My understanding is, that javaProxy is *only* non-null when the object
is wrapping a Java object; any Python object
(int/bool/float/list/dict/etc) has javaProxy set to null.
|
msg4153 (view) |
Author: Geoffrey French (MrMeanie) |
Date: 2009-02-21.23:05:40 |
|
The 'javaProxy' field can also be set when a python object derives from
a Java object.
The unit test has been expanded to check this. Please find attached.
|
msg4448 (view) |
Author: Frank Wierzbicki (fwierzbicki) |
Date: 2009-04-05.18:37:08 |
|
Applied to r6165 with the tests altered so that they get compiled and
picked up by regression testing. Thanks Geoffrey!
|
|
Date |
User |
Action |
Args |
2009-04-05 18:37:09 | fwierzbicki | set | status: open -> closed resolution: fixed messages:
+ msg4448 |
2009-03-14 14:24:28 | fwierzbicki | set | priority: high assignee: fwierzbicki |
2009-02-24 15:31:50 | fwierzbicki | set | nosy:
+ fwierzbicki |
2009-02-23 12:13:09 | cgroves | set | nosy:
+ cgroves |
2009-02-21 23:05:40 | MrMeanie | set | files:
+ identity_test_20090221_v2.zip messages:
+ msg4153 |
2009-02-21 23:00:15 | MrMeanie | set | files:
+ identity_fix_20090221.patch keywords:
+ patch messages:
+ msg4152 |
2009-02-21 22:35:47 | MrMeanie | create | |
|