ItEr41S23CUImportarTraballoRealizadoPorSubcontrata: Prevent null pointer exception.

This commit is contained in:
Manuel Rego Casasnovas 2009-12-30 21:18:48 +01:00 committed by Javier Moran Rua
parent d352c7c140
commit d5584dda99

View file

@ -164,7 +164,8 @@ public class AdvanceType extends BaseEntity {
}
public static boolean equivalentInDB(AdvanceType type, AdvanceType otherType) {
if (type.getId() == null || otherType.getId() == null) {
if (type == null || type.getId() == null || otherType == null
|| otherType.getId() == null) {
return false;
}
return type.getId().equals(otherType.getId());