Community
Participate
Working Groups
The Javadoc of IContainer.findMember(String) does not match reality: it specifies to find the members with a given *name* but actually treats the name as path. The Javadoc should also mention that "" finds the resource itself.
Created attachment 182365 [details] Modified javadoc I've added a note to javadoc to clarify.
We should not just add a note but rewrite the Javadoc since it clearly doesn't find a member by name but by path.
And please write complete sentences (e.g. *a* relative path...), see also http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html .
Created attachment 182373 [details] Corrected javadoc How do you like the javadoc now?
(In reply to comment #4) Looks better. But after looking more closely at the implementation, I think you should just copy the Javadocs of the corresponding findMember(IPath*) methods. That's more precise, and reducing variants is always goodness. Then compare IPath#append(String) and IPath#append(IPath) and add the missing bits to the findMember(String*) APIs: - The given string path must be a valid path. - @see IPath#isValidPath(String) ... and I would add: - @see IPath#isValidSegment(String)
Created attachment 182627 [details] Corrected javadoc I used javadoc from findMember(Path*) and added some links to IPath.
(In reply to comment #6) > Created an attachment (id=182627) [details] [diff] We're getting close, but when I select the two corresponding methods in the Outline view and then execute Compare With ... > Each Other, I still see unnecessary differences: #findMember(String) misses: * <p> * Note that no attempt is made to exclude team-private member resources * as with <code>members</code>. * </p> #findMember(String, boolean) misses the following paragraph from #findMember(String): * <p>Note that <code>path</code> contains a relative path to the resource * and all path special characters will be interpreted. Passing an empty string * will result in returning this {@link IContainer} itself. * </p> #findMember(String, boolean) contains "@see #members()", but it should be "@see #members(boolean)".
Created attachment 184255 [details] Markus comments to javadoc applied I've attached a patch with your comments applied.
Created attachment 184456 [details] findMember(String, boolean) and findMember(IPath, boolean) synchronized with eachother.
Looks good now. Committed to HEAD.