Problem overriding equals in a DTO object in Service Builder

Posted on 24/02/2012 by Charalampos Chrysikopoulos

If you try to override the equals method in a generated DTO object implementation and rerun the service builder, you will see the following error:

public boolean equals(java.lang.Object obj) {
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] Duplicate method equals(Object) in type DTOClp

Unfortunately there is no solution to this problem, this is a bug reported in liferay and it is still open.

The same problem will occur overriding the compareTo method.

We will update this post if we find a workaround for this issue...

This entry was posted in Liferay and tagged Liferay by Charalampos Chrysikopoulos

Add new comment