[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-3878) Seam validator throws NPE for classes which extends binary components.

Alexey Kazakov (JIRA) jira-events at lists.jboss.org
Thu Feb 26 09:18:55 EST 2009


Seam validator throws NPE for classes which extends binary components.
----------------------------------------------------------------------

                 Key: JBIDE-3878
                 URL: https://jira.jboss.org/jira/browse/JBIDE-3878
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: Seam
    Affects Versions: 3.0.0.GA
            Reporter: Alexey Kazakov
            Assignee: Alexey Kazakov
             Fix For: 3.0.0.GA


EXECUTE: Create Seam Web Project
EXECUTE: Create new class:

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
import org.jboss.seam.security.Identity;

@Scope(ScopeType.SESSION)
@Install(precedence=Install.APPLICATION)
@Startup
public class MyIdentity extends Identity {
	@Observer("myEvent")
	public void foo() {}
}

EXECUTE: Ctrl+S
ASSERT: There is an error message on foo method: "Only component class can have @Observer method"

But now there is not such error marker but NPE is thrown:

java.lang.NullPointerException
at org.jboss.tools.seam.internal.core.validation.ValidationErrorManager.addError(ValidationErrorManager.java:119)
at org.jboss.tools.seam.internal.core.validation.ValidationErrorManager.addError(ValidationErrorManager.java:81)
at org.jboss.tools.seam.internal.core.validation.SeamCoreValidator.validateMethodOfUnknownComponent(SeamCoreValidator.java:725)
at org.jboss.tools.seam.internal.core.validation.SeamCoreValidator.validateMethodsOfUnknownComponent(SeamCoreValidator.java:706)
at org.jboss.tools.seam.internal.core.validation.SeamCoreValidator.validate(SeamCoreValidator.java:199)
at org.jboss.tools.seam.internal.core.validation.SeamValidatorManager.validate(SeamValidatorManager.java:78)
at org.jboss.tools.seam.internal.core.validation.SeamValidatorManager.validateInJob(SeamValidatorManager.java:63)
at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

EXECUTE: Add @Name("org.jboss.seam.security.identity") to MyIdentity, Ctrl+S
ASSERT: There is not any error messsage.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list