Liferay service builder with generics

168 Views Asked by At

When attempting to generate a liferay service with generic method outputs: e.g.

/* ThingyLocalServiceImpl.java */

public <T> T doThing(Class<T> clazz){...};

Liferay does not generate the service interface correctly. It erroneously removes the '<T>' from the front and compilation fails saying it cannot find the type 'T'.

/* ThingyLocalService.java */

public T doThing(Class<T> clazz){...}
       ^ "error"       ^ "error"

Is this a bug or am I missing something? Thank you for your time.

0

There are 0 best solutions below