Scala Programming Language
  1. Scala Programming Language
  2. SI-7265

Properties.isJavaAtLeast is not futureproof and will start giving wrong results with Java 8

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.3, Scala 2.10.1, Scala 2.11.0-M2
    • Fix Version/s: Scala 2.10.3-RC1
    • Component/s: Misc Library
    • Labels:
      None

      Description

      /** Can the java version be determined to be at least as high as the argument?
        * Hard to properly future proof this but at the rate 1.7 is going we can leave
        * the issue for our cyborg grandchildren to solve.
        */
        def isJavaAtLeast(version: String) = {
          val okVersions = version match {
            case "1.5" => List("1.5", "1.6", "1.7")
            case "1.6" => List("1.6", "1.7")
            case "1.7" => List("1.7")
            case _ => Nil
          }
          okVersions exists (javaVersion startsWith _)
        }
      

      Although a quick survey of my offspring returned a sad empty response set, I think that code has reached it's end of life.

        Activity

        Show
        Simon Ochsenreither added a comment - https://github.com/scala/scala/pull/2275
        Hide
        James Iry added a comment -

        2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

        Show
        James Iry added a comment - 2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.
        Hide
        A. P. Marki added a comment -
        Show
        A. P. Marki added a comment - For the moment at least, https://github.com/scala/scala/pull/2666

          People

          • Assignee:
            A. P. Marki
            Reporter:
            Simon Ochsenreither
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development