bugs.java.com
JDK-8202332 - Java Issue Tracker
<init> constructor. We could implement this trivially if // <init> were never ... Coleen wrote: we rewrite the return in Object.<init> function into ...
<init> constructor. We could implement this trivially if // <init> were never ... Coleen wrote: we rewrite the return in Object.<init> function into ...
A DESCRIPTION OF THE PROBLEM : When providing a lambda function into a constructor that has a custom consumer interface as a parameter, compiler throws an assertion error. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile provided source code.
The behaviour can even be "cloaked" by using java.util.regex classes: Matcher.group() etc. which seem to use substring internally for String extraction. This way it's nearly impossible to detect the memory leak. This behaviour is totally independent of OS, Java Version, VM type etc.