pjfanning commented on code in PR #1968:
URL: https://github.com/apache/pekko/pull/1968#discussion_r2239326684


##########
project/JdkOptions.scala:
##########
@@ -19,89 +19,50 @@ import sbt.librarymanagement.VersionNumber
 
 object JdkOptions extends AutoPlugin {
   object autoImport {
-    lazy val jdk8home = settingKey[String]("JDK 8 home. Only needs to be set 
when it cannot be auto-detected by sbt")
     lazy val targetSystemJdk = settingKey[Boolean](
-      "Target the system JDK instead of building against JDK 8. When this is 
enabled resulting artifacts may not work on JDK 8!")
+      "Target the system JDK instead of building against JDK 17. When this is 
enabled resulting artifacts may not work on JDK 17!")
   }
   import autoImport._
 
   lazy val specificationVersion: String = 
sys.props("java.specification.version")
 
   object JavaVersion {
-    val majorVersion: Int = {
-      // FIXME replace with Runtime.version() when we no longer support Java 8
-      // See Oracle section 1.5.3 at:
-      // 
https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html
-      val version = specificationVersion.split('.')
-      val majorString =
-        if (version(0) == "1") version(1) // Java 8 will be 1.8
-        else version(0) // later will be 9, 10, 11 etc
-      majorString.toInt
-    }
+    val majorVersion: Int = java.lang.Runtime.version().feature()

Review Comment:
   it's still used but could possibly be removed in a later change



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to