For the below code getting Vulnerability, can someone assist with what to write instead:
@Override
public List<OptionItem> getCustomItems() {
return customItems;
}
Passing this
@Override
public List<OptionItem> getCustomItems() {
return List.copyOf(customItems);
}
@Override
public List<OptionItem> getCustomItems() {
return customItems != null ? List.copyOf(customItems) : List.of();
}
getting null pointer exception