This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 56e8a80f67 Update JavaVersion.scala (#2290)
56e8a80f67 is described below
commit 56e8a80f67b8f61e74790a857807a1aa724b30fc
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Oct 1 19:44:11 2025 +0100
Update JavaVersion.scala (#2290)
---
actor/src/main/scala/org/apache/pekko/util/JavaVersion.scala | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/actor/src/main/scala/org/apache/pekko/util/JavaVersion.scala
b/actor/src/main/scala/org/apache/pekko/util/JavaVersion.scala
index f97fe5f754..134895bf4f 100644
--- a/actor/src/main/scala/org/apache/pekko/util/JavaVersion.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/JavaVersion.scala
@@ -20,16 +20,6 @@ import org.apache.pekko.annotation.InternalApi
*/
@InternalApi private[pekko] 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 = System.getProperty("java.specification.version").split('.')
+ val majorVersion: Int = Runtime.version().feature()
- 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
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]