Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8200265

Intermittent build error in java.util.stream.Collectors - inference variable has incompatible bounds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 11
    • client-libs

      Spotted (only) once in the jdk/hs CI build on solaris/sparc. The build before and after it both succeeded, so the failure seems to be intermittent.

      open/src/java.base/share/classes/java/util/stream/Collectors.java:1564: error: incompatible types: inference variable K#1 has incompatible bounds
          return toMap(keyMapper, valueMapper, mergeFunction, HashMap::new);
                          ^
          equality constraints: V,U#2,K#3
          lower bounds: CAP#1,CAP#2
        where K#1,T#1,U#1,M,V,U#2,T#2,K#2,K#3 are type-variables:
          K#1 extends Object declared in method <T#1,K#1,U#1,M>toMap(Function<? super T#1,? extends K#1>,Function<? super T#1,? extends U#1>,BinaryOperator<U#1>,Supplier<M>)
          T#1 extends Object declared in method <T#1,K#1,U#1,M>toMap(Function<? super T#1,? extends K#1>,Function<? super T#1,? extends U#1>,BinaryOperator<U#1>,Supplier<M>)
          U#1 extends Object declared in method <T#1,K#1,U#1,M>toMap(Function<? super T#1,? extends K#1>,Function<? super T#1,? extends U#1>,BinaryOperator<U#1>,Supplier<M>)
          M extends Map<K#1,U#1> declared in method <T#1,K#1,U#1,M>toMap(Function<? super T#1,? extends K#1>,Function<? super T#1,? extends U#1>,BinaryOperator<U#1>,Supplier<M>)
          V extends Object declared in class HashMap
          U#2 extends Object declared in method <T#2,K#2,U#2>toMap(Function<? super T#2,? extends K#2>,Function<? super T#2,? extends U#2>,BinaryOperator<U#2>)
          T#2 extends Object declared in method <T#2,K#2,U#2>toMap(Function<? super T#2,? extends K#2>,Function<? super T#2,? extends U#2>,BinaryOperator<U#2>)
          K#2 extends Object declared in method <T#2,K#2,U#2>toMap(Function<? super T#2,? extends K#2>,Function<? super T#2,? extends U#2>,BinaryOperator<U#2>)
          K#3 extends Object declared in class HashMap
        where CAP#1,CAP#2 are fresh type-variables:
          CAP#1 extends U#2 from capture of ? extends U#2
          CAP#2 extends K#2 from capture of ? extends K#2
      1 error

            Unassigned Unassigned
            mikael Mikael Vidstedt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: