GenericEntity can only support one parameter

From: Bill Burke <>
Date: Wed, 20 Aug 2008 15:59:39 -0400

Why does GenericEntity only support one generic parameter? i.e.
List<String>? Why are we narrowing the superclass generic type to a
ParameterizedType and getting the first parameterized value? There's no
reason we couldn't have a Map as an entity object.

The constructor should really be:

    protected GenericEntity(T entity)
       if (entity == null)
          throw new IllegalArgumentException("The entity must not be null");
       this.entity = entity;
       this.type = getClass().getGenericSuperclass();
       this.rawType = entity.getClass();

Logged issue here:

Bill Burke
JBoss, a division of Red Hat