kmmbvnr / sarasvati

Automatically exported from code.google.com/p/sarasvati
0 stars 5 forks source link

HibTokenSetMemberEnv.setAttribute() method works incorrectly when invoked second time. #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When HibTokenSetMemberEnv.setAttribute() is called for the second time, 
corresponding property is removed from tokenset member instead of changing 
property value.

What steps will reproduce the problem?
1. create HibTokenSetMemberEnv object tsEnv;
2. tsEnv.setAttribute(0, "testAttr", "value");
3. tsEnv.setAttribute(0, "testAttr", "value1");
4. String attrValue = tsEnv.getAttribute(0,"testAttr");

Expected attrValue is "value1", actual is "value"; if HibTokenSetMemberEnv is 
recreated from HibTokenSet after session flush, the value is null.

The problem may be fixed with the attached patch (use property.setValue() 
instead of tokenSet...remove()).

Original issue reported on code.google.com by vaverche...@appsecinc.com on 26 Oct 2010 at 4:14

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed. Added a unit test as well.

Would you like a patch release with this included soon? I've got a couple of 
defects lined up for a 1.0.4 release. I could one now, or wait a while for some 
more to pile up.

Original comment by plor...@gmail.com on 26 Oct 2010 at 6:38

GoogleCodeExporter commented 9 years ago
Thank you, I'll wait for 1.0.4 release; will use my own patched build meanwhile.

Original comment by vaverche...@appsecinc.com on 26 Oct 2010 at 7:01

GoogleCodeExporter commented 9 years ago
Thank you for the bug report and patch, btw. Much appreciated.

Original comment by plor...@gmail.com on 26 Oct 2010 at 7:04

GoogleCodeExporter commented 9 years ago
1.0.4 was released quite a while ago. Marking bugs released.

Original comment by plor...@gmail.com on 18 Oct 2012 at 1:34