Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tigerstripe-dev] TAF refactoring and bug #253159

Hi folks,

I'd like to comment more on bug #253159. My understanding on the roots of the problem is following:

TAF's database works with Strings - not with URIs, so if I'm query for children of "resource://com/package1", results like "resource://com/package123" will be returned. From hierarchical URI standpoint "resource://com/package1" is *not* parent of "resource://com/package123".

So in AnnotationManager.changed(...) I do additional check if returned URI is a parent - if it is not - I log an exception (which is probably wrong - we shall not log this exception, or fix database to understand hirarchical URIs and log exception if invalid results returned).

According to above, fix provided for bug #253159 is not valid, consider example:

we have following annotated objects

(1) scheme://a/b/....
(2) scheme://a/b/b/....

After preforming refactoring below

Old -> New
scheme://a/b -> scheme://a/b/b

Right results would be

(1) scheme://a/b/b/....
(2) scheme://a/b/b/b/....

But because of fix for bug #253159, result will be completely incorrect like

scheme://a/b/b/.... - group (1) and group (2) will be joined under same namespace.

This problem is a result of "if(!uri.equals(newUri))" check introduced with the fix (existing scheme://a/b/b/ URIs will match new URIs and will not be refactored).

-- 
Best regards,
Yuri Strot


Back to the top