issue with fix for JDK-8064464

Liam Miller-Cushon cushon at
Mon Nov 24 19:37:24 UTC 2014

The fix for JDK-8064464 [1] [2] prevents the following code from compiling
(it works fine with 8u25 and 7u67). Is this deliberate?

abstract class Test {
  abstract <T> T e();
  abstract int f();
  void m(boolean flag) {
    String.valueOf(flag ? f() : this.<Integer>e());

$ javac error: reference to valueOf is ambiguous
    String.valueOf(flag ? f() : this.<Integer>e());
  both method valueOf(Object) in String and method valueOf(int) in String

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the compiler-dev mailing list