This is an automated email from the ASF dual-hosted git repository.

mimaison pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 2d8d792ae2d MINOR: Remove obsolete Scala annotations (#21353)
2d8d792ae2d is described below

commit 2d8d792ae2d1f564ad2cc022b8b273472f407326
Author: Dmitry Werner <[email protected]>
AuthorDate: Tue Jan 27 18:20:38 2026 +0500

    MINOR: Remove obsolete Scala annotations (#21353)
    
    
    Reviewers: Mickael Maison <[email protected]>
---
 core/src/main/scala/kafka/log/LogManager.scala    |  4 +--
 core/src/main/scala/kafka/utils/Annotations.scala | 38 -----------------------
 2 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/core/src/main/scala/kafka/log/LogManager.scala 
b/core/src/main/scala/kafka/log/LogManager.scala
index 5ea048cf4d7..481fbf7eee5 100755
--- a/core/src/main/scala/kafka/log/LogManager.scala
+++ b/core/src/main/scala/kafka/log/LogManager.scala
@@ -23,7 +23,6 @@ import java.nio.file.{Files, NoSuchFileException}
 import java.util.concurrent._
 import java.util.concurrent.atomic.AtomicInteger
 import kafka.server.{KafkaConfig, KafkaRaftServer}
-import kafka.utils.threadsafe
 import kafka.utils.Logging
 import org.apache.kafka.common.{DirectoryId, KafkaException, TopicPartition, 
Uuid}
 import org.apache.kafka.common.utils.{Exit, KafkaThread, Time, Utils}
@@ -57,8 +56,9 @@ import java.util.stream.Collectors
  * size or I/O rate.
  *
  * A background thread handles log retention by periodically truncating excess 
log segments.
+ *
+ * This class is thread-safe.
  */
-@threadsafe
 class LogManager(logDirs: Seq[File],
                  initialOfflineDirs: Seq[File],
                  configRepository: ConfigRepository,
diff --git a/core/src/main/scala/kafka/utils/Annotations.scala 
b/core/src/main/scala/kafka/utils/Annotations.scala
deleted file mode 100644
index da4a25c309f..00000000000
--- a/core/src/main/scala/kafka/utils/Annotations.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.
- */
-
-package kafka.utils
-
-import scala.annotation.StaticAnnotation
-
-/* Some helpful annotations */
-
-/**
- * Indicates that the annotated class is meant to be threadsafe. For an 
abstract class it is a part of the interface that an implementation
- * must respect
- */
-class threadsafe extends StaticAnnotation
-
-/**
- * Indicates that the annotated class is not threadsafe
- */
-class nonthreadsafe extends StaticAnnotation
-
-/**
- * Indicates that the annotated class is immutable
- */
-class immutable extends StaticAnnotation

Reply via email to