JDK-8242283 - Java Issue Tracker
... JavaSoft\Java Runtime Environment' Error: could not find java.dll Error ... return UNC path as wide string. But we maybe able to use char* if we change ...
... JavaSoft\Java Runtime Environment' Error: could not find java.dll Error ... return UNC path as wide string. But we maybe able to use char* if we change ...
code>. I understand that it is an error to overload a method with an other one with the same signature but a totally different return type. But it���s not clear to me why we are not allowed to change the return type in this particular case, since Integer is a subclass of Number.
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.
EXPECTED VERSUS ACTUAL BEHAVIOR : The method should return a string that can be passed to KeyStroke.getKeyStroke. My example does this for some keystrokes. I would like a full implementation to be added to the KeyStroke class.
- If the return types are unrelated functional interface types (however this is defined -- see JDK-8037804), then the old logic says they're both more specific than the other, and the new logic says neither is more specific. Either way, ambiguity error.
It's an error in java.lang.String source code which is the same for all JDK distributions.I have created a more simple example class which demonstrates this behaviour very clearly. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : See bug ID 4637640.