Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some quirks of the Java compiler?

IntelliJ has an inspection setting to warn you of "Javac quirks" that might affect your code, but I have yet to come across any. What are some of these quirks, either recognized by IntelliJ or in general?

like image 937
rosstex Avatar asked Dec 08 '14 09:12

rosstex


1 Answers

I've just seen "Use of '_' as a lambda parameter name is not allowed" (IntelliJ IDEA CE 14.0.2).

public static <T> BinaryOperator<T> toLastElement() {
    return (_, current) -> current;
}
like image 111
patch Avatar answered Sep 17 '22 01:09

patch