facebook

JEE 6 Events – Static Analysis Failing in IDE

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #330892 Reply

    Tony Herstell
    Participant

    Using JEE 6 Events:

    
    @Qualifier
    @Target(value = { ElementType.FIELD, ElementType.PARAMETER })
    @Retention(RetentionPolicy.RUNTIME)
    public @interface OrganisationCreateEvent {
    }
    

    Given handling method signiture snippit:

    
    @Observes @OrganisationCreateEvent Set<[color=red]OrganisationUserRole[/color]> organisationUserRole
    

    called by code:

       // Events
        @Inject
        @OrganisationCreateEvent
        Event<[color=red]Organisation[/color]> createEvent;
    ...
        this.createEvent.fire(organisation);

    I would expect the static analysis tools to see this is incompatible; but they do not.

    JEE 6 has made significant progress in strong typing to allow IDE’s to truly help in this area (a leap forward from Spring “strings”)

    Took a long time to spot this as i was so used to MyEclipse being so good at spotting stuff like this.

    Also turns out that you can have a HashSet in an event using Weld…. (Not 100% sure on this however)

    Spec:

    http://docs.oracle.com/javaee/6/tutorial/doc/gkhic.html

    Please advise.

    #330954 Reply

    support-swapna
    Moderator

    balanceofpower,

    Sorry that you are seeing this issue.

    If you are seeing this issue on ME 10.6, can you please check if you see the same issue in Eclipse 3.7.2 which is the base for MyEclipse 10.6 ?

    Also please attach a sample project which exhibits this issue for us to take a look at our end.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JEE 6 Events – Static Analysis Failing in IDE

You must be logged in to post in the forum log in