Open ddimtirov opened 7 years ago
Confirmed in v0.9.9.4 test snippet with 3 cases
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
public class Issue71 {
public static void main(String[] args) {
List<String> value = new ArrayList<>();
if (value instanceof Collection) {
// error #1 value)
List<Object> a = ((Collection<?>) value).stream().map(Column::defaultFormatter).collect(Collectors.toList());
}
// error #2 first)
Map<String, Object> first = new HashMap<String, Object>();
final Object tableName = ((Map<String, ?>) first).get(".table");
}
public static BigDecimal toBigDecimal(final Integer value) {
// error #3 value?)
return value != null ? BigDecimal.valueOf(value) : null;
}
protected static class Column {
static <R> R defaultFormatter(Object o) {
return null;
}
}
}
Also confirmed in v0.9.9.7 with the edited snippet on the above comment ☝️
Folded to:
Note the dangling parenthesis after
value
.