Skip to content

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

Description

@scabug
/** 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions