An article on the Oracle Java Community sites gives as an example (for a JPA Converter, but that\'s not relevant, I guess) the following method:
public Boole
This redundant casting is useless.
Current code can be simplify to
public Boolean convertToEntityAttribute(String y) { return "Y".equals(y); }