simply, I want to check if an Element is deleted from a list, and than do some actions after that. Here is a snippet of my code:
(...)
private CollectionUtils removed;
public void subscription() {
if (CollectionUtils.isEmpty(save)) {
System.out.println("blabla");
JsfUtils.addTranslatedMessageToTarget(FacesMessage.SEVERITY_INFO, null, "bla");
} else if (CollectionUtils.subtract(save, removed)){ //Check if element is deleted
System.out.println(removed + " blablaca");
} else {
System.out.println("blabla");
}
}
I edited and cut some code because its for a company I work for. At subtract he suggest to cast the Collection Type on "Collection", which doesnt make any sense for me. As Exception it points out an nullpointer exception.
Thanks