Community
Participate
Working Groups
20050509 The Javadoc of the factory methods for classpath entries should specify that more than one classpath attributes with same key is disallowed. See also bug 94163.
We did not intend duplicates there, and should indeed prevent these to occur. Proposal is to spec this, and have classpath validation reject this scenario (thus one cannot set such a classpath). Could only be done for RC1 at best. Jim - ok for this minor API tuning ?
approved for RC1
Paragraph about extra attributes will be modified as follow for each javadoc comment of JavaCore.new*Entry method: * <p> * The <code>extraAttributes</code> list contains name/value pairs that must be persisted with * this entry. If no extra attributes are provided, an empty array must be passed in.<br> * Note that this list should not contain any duplicate name. * </p> Note that new message status will be displayed in case of duplicate extra attribute while validating classpath entry in ClasspathEntry.validateClasspathEntry(...)): "Duplicate extra attribute: ''{0}'' in classpath entry ''{1}'' for project {2}" Note also that, to minimize side effect (safe mode at this late stage of dvpt...), this validation is done after all other validations already done in this method. That means this message will only be visible in status if classpath entry does not contain any other error...
Fixed as described in previous comment and released in HEAD. [jdt-core internal] Changes done in JavaCore.new*Entry methods (javadoc comments), ClasspathEntry.validateClasspathEntry(....) method and org.eclipse.jdt.internal.core.util.Messages Test case added in ClasspathTests
Verified in I20050526-2000