Search code examples
javaeclipselambdacompiler-warningssuppress-warnings

Internal inconsistency detected during lambda shape analysis


In a similar problem as is described in this unanswered question and this other unanswered question, I receive a warning in Eclipse Luna Service Release 1 (4.4.1) (20140925-1800) reading, "(Recovered) Internal inconsistency detected during lambda shape analysis". The code is as follows:

public static <T> T findFirst(Iterable<T> list, Predicate<T> condition)  {
    /* ... */
}

public static Integer findFirstPrime(Iterable<Integer> integers) {
    return findFirst(integers,
            integer -> {
                /* return either true or false */
            }
    );
}

The warning is raised on the text reading integer ->. There is a bug report stating that the issue is fixed for Eclipse Mars 4.5, but what can I do in the meantime? If I want to use @SuppressWarnings, how do I know what warning type to supply?


Solution

  • Unfortunately, this is not the type of warning you can suppress.

    At least it looks like the fix has been back-ported to the 4.4.2 maintenance release of Luna, which is due to be released on February 27, 2015:

    https://projects.eclipse.org/projects/eclipse/releases/4.4.2/plan