Felix Meschberger wrote: > Thanks for pointing this out. > > According to the current (and previous) implementation and expectations, > this JavaDoc is wrong and the JavaDoc of the other resolve methods is > incomplete and does not reflect intentions. > > The intentions are, that the resolve methods never return null but > instead return a NonExistingResource if the path cannot resolve to a > resource. > > This contrasts with the getResource methods, which in fact will return > null if a resource cannot be found (and hence never return a > NonExistingResource). > > So the solution to this problem would be update the JavaDoc to something > like: "@return The resource addressed by the path or NonExistingResource > if no resource can be resolved". > Hmm, so far the resolve(String) method returned null if the resource could not be found. So I fear we can't change this behaviour as this would introduce incompatibilities :(
I'm all for a consistent behaviour so your suggestions make sense. People are always confused what the difference between resolve(String) and getResource(String) is - if the only difference is that the latter returns null in the case of a non existing resource we might also forget about this method completly :) Carsten -- Carsten Ziegeler [EMAIL PROTECTED]