[Yanel-dev] [Yarep] Bug/feature re indexing of properties
Michael Wechner
michael.wechner at wyona.com
Wed May 12 15:02:22 CEST 2010
Guillaume Déflache wrote:
>
> It looks like the property values also get escaped, I get:
yes (on purpose), but it should also be unescaped when reading it (in
the case of version 1.0), otherwise this would be a bug
>> org.wyona.yarep.core.RepositoryException: Unparseable date:
>> "2010-05-11T17\:11\:39\:295+0200"
>> at
>> org.wyona.yarep.impl.DefaultProperty.setValueFromString(DefaultProperty.java:84)
>>
>> at
>> org.wyona.yarep.impl.repo.vfs.VirtualFileSystemNode.readProperties(VirtualFileSystemNode.java:156)
>>
>> at
>> org.wyona.yarep.impl.repo.vfs.VirtualFileSystemNode.init(VirtualFileSystemNode.java:113)
>>
>> at
>> org.wyona.yarep.impl.repo.vfs.VirtualFileSystemNode.<init>(VirtualFileSystemNode.java:73)
>>
>> at
>> org.wyona.yarep.impl.repo.vfs.VirtualFileSystemRepository.getNode(VirtualFileSystemRepository.java:386)
>>
>> at
>> org.wyona.yarep.impl.repo.vfs.VirtualFileSystemNode.getNodes(VirtualFileSystemNode.java:198)
>>
> with the following metadata file:
>> yarep_vfs-meta-file-version<string>:1.0
>> yarep_checkinDate<date>:2010-05-11T17\:11\:39\:295+0200
>> yarep_type<string>:resource
>> yarep_mimeType<string>:application/xml
>> yarep_checkoutUserID<string>:bob
>> yarep_isCheckedOut<boolean>:false
>> yarep_checkoutDate<date>:2010-05-11T17\:11\:25\:580+0200
as mentioned above these values should be unescaped. AFAIK, within the
tests this is working.
>
>
>> Also I have fixed another problem re line breaks which was noted as
>> TODO within the code.
>>
>> Also to make it backwards compatible I have introduced a version
>> number which is a property itself:
>>
>> yarep_vfs-meta-file-version<string>:1.0
>
> It looks like we may need to define 1.0.1 to fix this.
fix what exactly?
>
>
>> which means all meta data which does not contain this property is
>> being handled as before, but as soon as it is being
>> rewritten it should be handled with escaped colons.
>
> So AFAICU there is no workaround: as soon as one writes to the file,
> the new 1.0 gets used, right?
yes. Any reason why this shouldn't happen?
>
>
>> All my tests are fine, but in case you should encounter any problem,
>> please let me know.
>
> All the related tests are in
> /home/guillaume/yarep.VCWC/src/test/java/org/wyona/yarep/tests/VirtualFilesystemRevisionsTest.java
> in the 'testEscapeUnescapePropertyName' method, right?
no, there is also
src/test/java/org/wyona/yarep/tests/VirtualFilesystemIndexSearchTest.java
> It seems the case with ':' in property values is explicitely tested,
> but AFAICS only with values of type string, not with values of type
> date, maybe that's the problem.
I have tested this with the from scratch realm also and it seemed fine
to me there.
Pleaes also test it with the from scrartch realm and let me know if this
should be a problem.
Maybe the root of problem is somewhere else, but you need to give me
more information about where exactly you are experiencing these issues.
Thanks
Michi
>
> Cheers,
> Guillaume
More information about the Yanel-development
mailing list