Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dali-dev] Small API change

Well, the short answer is that it was needed to fix the bug, but the longer answer is that the bug was caused by loose coupling of the resource model provider with the type of resource it needs to return. If resource model provider A was obtained for a given path, then the project resource set will store a resource of type A for that URI, even if the file represented by the path doesn't actually exist. If another resource provider B was obtained for the same path, then the B resource model provider was returning the stored A resource instead of a new B resource, simply because A also fit the loose resource typing for the B resource model provider. This patch requires that an extender of AbstractResourceModelProvider declare its resource type using the new generic, and also implement
boolean ensureCorrectType(Resource).

I'm not aware of anyone besides us extending this.

Paul Fullbright
Oracle Corp.
Eclipse Dali/Java Persistence Tools Development
paul.fullbright@xxxxxxxxxx



David M Williams wrote:
Paul, can you explain what the change was, and why it was needed? I'm not saying there is a problem, but I don't "see" it from looking at the patch, and was just wondering.




From:
Paul Fullbright <paul.fullbright@xxxxxxxxxx>
To:
dali-dev mailing list <dali-dev@xxxxxxxxxxx>
Date:
11/11/2008 03:46 PM
Subject:
[dali-dev] Small API change



As a result of fixing bug 254485 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=254485) I made a small API change that should not affect clients, but could affect extenders, if there are any extenders contributing new resource models.

We're assuming that there are no so extenders as of yet, but please check out the patch to make sure.



Back to the top