Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tests for array observers #187

Closed
wants to merge 1 commit into from
Closed

Conversation

zborisha
Copy link

In an attempt to create a test to prove https://community.jboss.org/message/726334#726334 I created one simple test. It works fine (does not fail) with latest weld build (from github) but test fails with Weld 1.1.5.Final.

Probably worth including!

@alesj
Copy link
Member

alesj commented Mar 26, 2012

So it works. Nice.
It means you just need to update then. :-)

Big thanks for the tests, they will definitely be included asap.

@zborisha
Copy link
Author

Actually :(

Just tested few times again and it fails with HotSpot 1.6.0_17 but passes with HotSpot 1.7.0
I tried few times, same computer, same repo, same workspace, same Maven version, but different $JAVA_HOME and same result (fails with one Java version but passes with another one).

So, probably someone else should take a look at this since it behaves strangely in my environment.

I can give you additional info - surfire-reports etc if you need them.

Regards
Borisa

@mkouba
Copy link
Member

mkouba commented Mar 27, 2012

I created similar test for CDI TCK. The problem occurs only when firing event via built-in Event bean. In that case Weld gets event type information through reflection and that's the problem.

See org.jboss.weld.bean.builtin.AbstractFacade.getFacadeType(InjectionPoint). getActualTypeArguments()[0] returns
GenericArrayType instead of Class amd so no observer is resolved. And moreover it seems that Java 7 handles generics via reflection a little bit different...

@mkouba
Copy link
Member

mkouba commented Mar 28, 2012

Filed an issue: https://issues.jboss.org/browse/WELD-1097

@alesj
Copy link
Member

alesj commented Apr 6, 2012

Part of Marko's weld1096 branch.

@alesj alesj closed this Apr 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants