Skip to content

Instantly share code, notes, and snippets.

@ptahchiev
Created April 1, 2015 16:50
Show Gist options
  • Save ptahchiev/322344acc453c23f4baa to your computer and use it in GitHub Desktop.
Save ptahchiev/322344acc453c23f4baa to your computer and use it in GitHub Desktop.
CustomConverionSerice - no compiler warnings :)
@Override
public <SOURCE, TARGET> Collection<TARGET> convert(Collection<SOURCE> sources, Class<TARGET> targetClass) {
final List<TARGET> result = new ArrayList<>();
if (sources != null) {
for (SOURCE source : sources) {
result.add(super.convert(source, targetClass));
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment