]
George Gastaldi closed FORGE-1829.
----------------------------------
Fix Version/s: 3.0.0.Final
(was: 3.x Future)
Assignee: George Gastaldi
Resolution: Done
setItemLabelConverter cause NullPointerException in Eclipse
-----------------------------------------------------------
Key: FORGE-1829
URL:
https://issues.jboss.org/browse/FORGE-1829
Project: Forge
Issue Type: Bug
Components: UI - Eclipse
Reporter: Aslak Knutsen
Assignee: George Gastaldi
Fix For: 3.0.0.Final
{code}
containerAdapter.setItemLabelConverter(new Converter<Container, String>() {
@Override
public String convert(Container source) {
return source.getId();
}
});
{code}
In Eclipse, the Converter is called with a "null" argument during Step/Command
initialization. Unless the user specifically checks for null a NullPointerException is
thrown.
This is especially odd in the case where the user provide a Set of ValueChoices to
convert and none of those are null.