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-http.git


The following commit(s) were added to refs/heads/main by this push:
     new a665a298f remove JavaVersion (#721)
a665a298f is described below

commit a665a298f23450f1a915a48ecfb4c22f89459c0d
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Aug 18 13:38:18 2025 +0100

    remove JavaVersion (#721)
    
    * remove JavaVersion
    
    * Create remove-javaversion.excludes
---
 .../remove-javaversion.excludes                    | 20 +++++++++++++
 .../http/impl/engine/http2/Http2AlpnSupport.scala  |  2 +-
 .../apache/pekko/http/impl/util/JavaVersion.scala  | 35 ----------------------
 3 files changed, 21 insertions(+), 36 deletions(-)

diff --git 
a/http-core/src/main/mima-filters/1.3.x.backwards.excludes/remove-javaversion.excludes
 
b/http-core/src/main/mima-filters/1.3.x.backwards.excludes/remove-javaversion.excludes
new file mode 100644
index 000000000..7ae91fa87
--- /dev/null
+++ 
b/http-core/src/main/mima-filters/1.3.x.backwards.excludes/remove-javaversion.excludes
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Remove internal JavaVersion class
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.http.impl.util.JavaVersion")
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.http.impl.util.JavaVersion$")
diff --git 
a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2AlpnSupport.scala
 
b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2AlpnSupport.scala
index 2e6f57e30..542937603 100644
--- 
a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2AlpnSupport.scala
+++ 
b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2AlpnSupport.scala
@@ -16,9 +16,9 @@ package org.apache.pekko.http.impl.engine.http2
 import org.apache.pekko
 import pekko.annotation.InternalApi
 import pekko.http.impl.engine.http2.Http2AlpnSupport.{ H2, HTTP11 }
-import pekko.http.impl.util.JavaVersion
 import pekko.stream.TLSProtocol.NegotiateNewSession
 import pekko.stream.impl.io.TlsUtils
+import pekko.util.JavaVersion
 
 import java.{ util => ju }
 import javax.net.ssl.SSLEngine
diff --git 
a/http-core/src/main/scala/org/apache/pekko/http/impl/util/JavaVersion.scala 
b/http-core/src/main/scala/org/apache/pekko/http/impl/util/JavaVersion.scala
deleted file mode 100644
index 6665af078..000000000
--- a/http-core/src/main/scala/org/apache/pekko/http/impl/util/JavaVersion.scala
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/**
- * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.http.impl.util
-
-import org.apache.pekko.annotation.InternalApi
-
-/**
- * INTERNAL API
- */
-@InternalApi object JavaVersion {
-
-  val majorVersion = {
-    // 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 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]

Reply via email to