From 1f379842c0ce547d8f78e975964ee9fc0861ea97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E=E9=B8=A3?= Date: Tue, 16 Jun 2026 01:56:24 +0800 Subject: [PATCH] docs: remove stale JDK 11 deprecation comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Motivation: Java 17 is the project baseline. Comments annotating deprecations introduced "in JDK 11+" or scalac options once unavailable on JDK 11 are now stating the obvious and add noise. Modification: - Drop the trailing `// deprecated in JDK 11+` comment from both `field.isAccessible()` call sites in `PekkoConnectorsResultMapperHelper.scala` (influxdb). The call itself is retained — only the now-redundant deprecation note is removed. - Update stale `// JDK 11 ...` notes in `project/Common.scala` and `build.sbt` to `// project baseline is Java 17: ...` (aligned with apache/pekko#3075 comment style). Result: No behavior change. Comments now reflect the actual Java baseline. --- build.sbt | 2 +- .../influxdb/impl/PekkoConnectorsResultMapperHelper.scala | 4 ++-- project/Common.scala | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 23942b4f0..445a201bd 100644 --- a/build.sbt +++ b/build.sbt @@ -302,7 +302,7 @@ lazy val influxdb = pekkoConnectorProject( "influxdb", Dependencies.InfluxDB, Compile / scalacOptions ++= Seq( - // JDK 11: method isAccessible in class AccessibleObject is deprecated + // project baseline is Java 17: method isAccessible in class AccessibleObject is deprecated "-Wconf:cat=deprecation:s")) lazy val ironmq = pekkoConnectorProject( diff --git a/influxdb/src/main/scala/org/apache/pekko/stream/connectors/influxdb/impl/PekkoConnectorsResultMapperHelper.scala b/influxdb/src/main/scala/org/apache/pekko/stream/connectors/influxdb/impl/PekkoConnectorsResultMapperHelper.scala index a64a8ed31..681ed63dd 100644 --- a/influxdb/src/main/scala/org/apache/pekko/stream/connectors/influxdb/impl/PekkoConnectorsResultMapperHelper.scala +++ b/influxdb/src/main/scala/org/apache/pekko/stream/connectors/influxdb/impl/PekkoConnectorsResultMapperHelper.scala @@ -72,7 +72,7 @@ private[impl] class PekkoConnectorsResultMapperHelper { val columnName: String = column.name() val fieldType: Class[?] = field.getType() - val isAccessible = field.isAccessible() // deprecated in JDK 11+ + val isAccessible = field.isAccessible() if (!isAccessible) { field.setAccessible(true); } @@ -181,7 +181,7 @@ private[impl] class PekkoConnectorsResultMapperHelper { if (value == null) return val fieldType = field.getType try { - val isAccessible = field.isAccessible() // deprecated in JDK 11+ + val isAccessible = field.isAccessible() if (!isAccessible) field.setAccessible(true) if (fieldValueModified(fieldType, field, obj, value, precision) || fieldValueForPrimitivesModified( fieldType, diff --git a/project/Common.scala b/project/Common.scala index 4a9e38253..4c26173a8 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -118,7 +118,7 @@ object Common extends AutoPlugin { "-Xlint:overloads", "-Xlint:overrides", "-Xlint:rawtypes", - // JDK 11 "-Xlint:removal", + // project baseline is Java 17: "-Xlint:removal", "-Xlint:static", "-Xlint:try", "-Xlint:unchecked",