I get a warning in Eclipse if I don't have the wildcard:  "Class is a raw
type. References to generic type Class<T> should be parameterized"

Thinking about this further, I think the event interface (and the classes
that implement the interface) should return a list of classes, not an array
of classes.  The reason it currently returns an array is that the
@OnEvent.types property is an array.  However, there's no reason that the
event has to do the same thing.  I think a List is a littler nicer than an
array in the ITypedEvent interface.

The method in ITypedEvent (and the abstract classes that implement it) will
instead be:

List<Class<?>> getTypes()


On Thu, Jun 5, 2014 at 3:04 AM, Martin Grigorov <notifications@github.com>
wrote:

> In
> jdk-1.7-parent/annotationeventdispatcher-parent/annotationeventdispatcher/src/main/java/org/wicketstuff/event/annotation/AbstractClassTypedPayloadEvent.java:
>
> > +
> > +	/**
> > +	 * Constructor.
> > +	 *
> > +	 * @param target
> > +	 *            {@link AjaxRequestTarget} associated with the event
> > +	 * @param payload
> > +	 *            the type of the event
> > +	 */
> > +	public AbstractClassTypedPayloadEvent(final AjaxRequestTarget target,
> > +			final Class<?> payload) {
> > +		super(target, payload);
> > +	}
> > +
> > +	@Override
> > +	public Class<?>[] getTypes() {
>
> is <?> necessary here ?
> I may be wrong but I think Intellij IDEA has an inspection for that and
> suggests to remove the generics for arrays.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/wicketstuff/core/pull/309/files#r13426510>.
>