Skip to content

Instantly share code, notes, and snippets.

@ankon
Last active August 29, 2015 14:19
Show Gist options
  • Save ankon/0abc0863074e717ece3f to your computer and use it in GitHub Desktop.
Save ankon/0abc0863074e717ece3f to your computer and use it in GitHub Desktop.
Oracle vs Eclipse javac
public <T>T removeFieldListValue(Field field, Function<Object, T> valueMapper, T value) {
return removeFieldListValue(field, valueMapper, value::equals);
}
public <T> T removeFieldListValue(Field field, Function<Object, T> valueMapper, Function<T, Boolean> predicate) {
// Whatever
return null;
}
eclipse: all good
javac: thinks that v->value.equals(v) can refer to either, i.e. T could be a Function<T, Boolean>????
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment