User can specify a custom component with the same name as any built-in component. We should mark @Name("...") as duplicate only if a few custom components specify the same name.
EXECUTE: Create a Seam Web Project.
EXECUTE: Create:
package ... import static org.jboss.seam.ScopeType.SESSION; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; import org.jboss.seam.annotations.Startup; import org.jboss.seam.annotations.intercept.BypassInterceptors; import org.jboss.seam.international.StatusMessages; import org.jboss.seam.security.Identity; @Name("org.jboss.seam.security.identity") @Scope(SESSION) @BypassInterceptors @Startup public class CustomIdentity extends Identity { }
EXECUTE: Save the file.
FAILURE: 'Duplicate component name: "org.jboss.seam.security.identity"' error marker appears.
ASSERT: No error marker on @Name("org.jboss.seam.security.identity") appears.