Summary: | [model] Disallow classpath attributes with same key | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | jeem |
Version: | 3.1 | ||
Target Milestone: | 3.1 RC1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Martin Aeschlimann
2005-05-10 12:25:22 EDT
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 |