Ok, the issue only happens when you don't have CDI activated, a workaround is to create an empty beans.xml in WEB-INF
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-08-04 15:40 GMT+02:00 Svetlin Zarev <[email protected]>: > Thanks, I've created a JIRA issue and also attached a sample application > that demonstrates the issue: > https://issues.apache.org/jira/browse/TOMEE-1896 > > 2016-08-04 16:25 GMT+03:00 Romain Manni-Bucau <[email protected]>: > > > Best is either JIRA with a patch or github with a pull request. In both > > cases ensure to provide a test case reproducing the issue you think you > > spotted > > > > You probably missed the line just before the arraycopy which init the > first > > index and the copy starts from index 1 so all is done as expected I > think. > > > > > > Romain Manni-Bucau > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog > > <http://rmannibucau.wordpress.com> | Github < > > https://github.com/rmannibucau> | > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > > <http://www.tomitribe.com> | JavaEE Factory > > <https://javaeefactory-rmannibucau.rhcloud.com> > > > > 2016-08-04 15:22 GMT+02:00 Svetlin Zarev <svetlin.angelov.zarev@gmail. > com > > >: > > > > > Hi, > > > > > > > we set the first and last listeners so it looks right. > > > > > > Notice the initial index of the destination array in the > > System.arraycopy() > > > call. You start from index 1 -> the first element in the new array is > > NULL > > > and last one gets overwritten by: > > > > > > newEventListeners[newEventListeners.length - 1] = endWebBeansListener; > > > > > > > > > But if you System.arraycopy() to the destination array with start index > > of > > > 0, the first element of the array will not be NULL, but will contain > the > > > first listener as expected. In that case the last element will be NULL > > and > > > > > > newEventListeners[newEventListeners.length - 1] = endWebBeansListener; > > > > > > will not overwrite anything. > > > > > > PS: Is there a better place to report such issues ? Does someone > monitor > > > the github mirror, so I can make pull request which are much easier to > > > review as they have more context ? > > > > > > Kind regards, > > > Svetlin > > > > > >
