incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne Jalkanen <Janne.Jalka...@ecyrd.com>
Subject Re: Priha bug
Date Fri, 19 Feb 2010 19:38:46 GMT

Hmm... This sounds odd. I'll take a look. My immediate thought is that  
addToProperty() is doing something wrong with respect to the Value  
array.

/Janne

On Feb 15, 2010, at 17:27 , Andrew Jaquith wrote:

> Janne --
>
> There's a bug in the current version of Priha included with JSPWiki
> that is preventing properties from getting saved properly.
>
> Steps to reproduce:
>
> 0. Remove the s.save() statement at line 863 in ReferenceManager that
> shouldn't be there.
> 1. Debug ReferenceManagerTest.testRemoveFromProperty().
> 2. Step through the two ReferenceManager.addToProperty() calls. This
> is called twice in sequence by ReferenceManagerTest, line 392:
>
>        mgr.addToProperty( jcrPath, "foo","Value1", true );
>        mgr.addToProperty( jcrPath, "foo","Value2", true );
>
> 3. When you step through ReferenceManager.addToProperty, everything
> looks ok. The Session doesn't find the Property the first time, and
> adds it as it should. The second time, it finds the Property and adds
> the value... again, as it should.
>
> 4. Line 394 of ReferenceManagerTest immediately does this:
>
>        s.save();
>
> 5. When you inspect the file system, only one foo*.data file is there:
> foo0.data, and it contains "Value2." So one of the values has gone
> missing.
>
> Weird, huh?
>
> Andrew


Mime
View raw message