tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svetlin Zarev <svetlin.angelov.za...@gmail.com>
Subject Re: TomcatWebAppBuilder overwrites the last added event listener
Date Thu, 04 Aug 2016 13:40:42 GMT
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 <rmannibucau@gmail.com>:

> 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
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message