JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that ... In the code for the Inner constructor, you use an accessor method to ...
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that ... In the code for the Inner constructor, you use an accessor method to ...
For example, "static Integer Integer.valueOf(String)" fits this pattern and is indeed a static factory. What surprised me was how extensive static factories are used in the JDK.The summary table order would make sense with the constructors first and static factory methods second.
The constructors are very simple, they don't create a galore of method handles. Methods will be linked on first invocation. Return type conversions work automatically (we just need to take care of filtering hidden objects for Object return type).
A DESCRIPTION OF THE PROBLEM : There is a different handling for final member in constructor: Accessing by this or without this lead to a compile error or does not.EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - I'd prefer to get a compile error for FinalClass, too.
fails with: Test.java:11: error: incompatible types: cannot infer type-variable(s) T,U.type-variable: CAP#1 extends String from capture of ? extends String 1 error. but if the lambda is implicit: e -> e.trim(), it compiles just fine.