Bug#981951: scala: FTBFS with OpenJDK 17: StringBuilder.scala overriding method isEmpty in trait CharSequence

Emmanuel Bourg ebourg at apache.org
Fri Feb 5 10:39:41 GMT 2021


Source: scala
Severity: important
Tags: ftbfs sid bookworm
User: debian-java at lists.debian.org
Usertags: default-java17

scala fails to build with OpenJDK 17 because java.lang.CharSequence gained an isEmpty()
method in OpenJDK 15 which now conflicts with a similar method in StringBuilder.scala:


  locker.lib:
      [mkdir] Created dir: /<<PKGBUILDDIR>>/build/locker/classes/library
      [javac] Using javac -source 1.5 is no longer supported, switching to 7
      [javac] Using javac -target 1.6 is no longer supported, switching to 7
      [javac] Compiling 32 source files to /<<PKGBUILDDIR>>/build/locker/classes/library
      [javac] warning: [options] bootstrap class path not set in conjunction with -source 7
      [javac] warning: [options] source value 7 is obsolete and will be removed in a future release
      [javac] warning: [options] target value 7 is obsolete and will be removed in a future release
      [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      [javac] 4 warnings
  [locker.library] Compiling 579 files to /<<PKGBUILDDIR>>/build/locker/classes/library
  [locker.library] /<<PKGBUILDDIR>>/src/library/scala/collection/mutable/StringBuilder.scala:31: error: overriding method isEmpty in trait CharSequence of type ()Boolean;
  [locker.library]  method isEmpty in trait IndexedSeqOptimized of type => Boolean cannot override a concrete member without a third member that's overridden by both (this rule is designed to prevent ``accidental overrides'')
  [locker.library] final class StringBuilder(private val underlying: JavaStringBuilder)
  [locker.library]             ^
  [locker.library] one error found
  
  BUILD FAILED



More information about the pkg-java-maintainers mailing list