Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:FactoryCandidates
netty
0006-Do-not-use-the-Jetbrains-annotations.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-Do-not-use-the-Jetbrains-annotations.patch of Package netty
From 3d2d165de5adfaf0ab6cf79d48bc27d0546238bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch> Date: Thu, 30 Mar 2023 13:20:35 +0200 Subject: [PATCH 6/7] Do not use the Jetbrains annotations --- common/src/main/java/io/netty/util/Recycler.java | 2 -- .../java/io/netty/util/concurrent/AbstractEventExecutor.java | 4 +--- .../java/io/netty/util/concurrent/GlobalEventExecutor.java | 4 +--- .../io/netty/util/concurrent/SingleThreadEventExecutor.java | 5 ++--- .../test/java/io/netty/util/RecyclerFastThreadLocalTest.java | 2 -- common/src/test/java/io/netty/util/RecyclerTest.java | 4 +--- 6 files changed, 5 insertions(+), 16 deletions(-) diff --git a/common/src/main/java/io/netty/util/Recycler.java b/common/src/main/java/io/netty/util/Recycler.java index c434874bff..3df4f1d772 100644 --- a/common/src/main/java/io/netty/util/Recycler.java +++ b/common/src/main/java/io/netty/util/Recycler.java @@ -24,7 +24,6 @@ import io.netty.util.internal.UnstableApi; import io.netty.util.internal.logging.InternalLogger; import io.netty.util.internal.logging.InternalLoggerFactory; import org.jctools.queues.MessagePassingQueue; -import org.jetbrains.annotations.VisibleForTesting; import java.util.ArrayDeque; import java.util.Queue; @@ -208,7 +207,6 @@ public abstract class Recycler<T> { return true; } - @VisibleForTesting final int threadLocalSize() { LocalPool<T> localPool = threadLocal.getIfExists(); return localPool == null ? 0 : localPool.pooledHandles.size() + localPool.batch.size(); diff --git a/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java b/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java index 6409578637..e9463935ba 100644 --- a/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java +++ b/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java @@ -19,8 +19,6 @@ import io.netty.util.internal.UnstableApi; import io.netty.util.internal.logging.InternalLogger; import io.netty.util.internal.logging.InternalLoggerFactory; -import org.jetbrains.annotations.Async.Execute; - import java.util.Collection; import java.util.Collections; import java.util.Iterator; @@ -169,7 +167,7 @@ public abstract class AbstractEventExecutor extends AbstractExecutorService impl } } - protected static void runTask(@Execute Runnable task) { + protected static void runTask(Runnable task) { task.run(); } diff --git a/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java b/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java index 4514c023a3..542eecee3f 100644 --- a/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java +++ b/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java @@ -21,8 +21,6 @@ import io.netty.util.internal.ThreadExecutorMap; import io.netty.util.internal.logging.InternalLogger; import io.netty.util.internal.logging.InternalLoggerFactory; -import org.jetbrains.annotations.Async.Schedule; - import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Queue; @@ -221,7 +219,7 @@ public final class GlobalEventExecutor extends AbstractScheduledEventExecutor im execute0(task); } - private void execute0(@Schedule Runnable task) { + private void execute0(Runnable task) { addTask(ObjectUtil.checkNotNull(task, "task")); if (!inEventLoop()) { startThread(); diff --git a/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java b/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java index b93b7cd377..7838cb7787 100644 --- a/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java +++ b/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java @@ -21,7 +21,6 @@ import io.netty.util.internal.SystemPropertyUtil; import io.netty.util.internal.ThreadExecutorMap; import io.netty.util.internal.logging.InternalLogger; import io.netty.util.internal.logging.InternalLoggerFactory; -import org.jetbrains.annotations.Async.Schedule; import java.lang.Thread.State; import java.util.ArrayList; @@ -822,12 +821,12 @@ public abstract class SingleThreadEventExecutor extends AbstractScheduledEventEx lazyExecute0(task); } - private void execute0(@Schedule Runnable task) { + private void execute0(Runnable task) { ObjectUtil.checkNotNull(task, "task"); execute(task, wakesUpForTask(task)); } - private void lazyExecute0(@Schedule Runnable task) { + private void lazyExecute0(Runnable task) { execute(ObjectUtil.checkNotNull(task, "task"), false); } diff --git a/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java b/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java index 7c8d4da113..1dfaffc7da 100644 --- a/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java +++ b/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java @@ -16,7 +16,6 @@ package io.netty.util; import io.netty.util.concurrent.FastThreadLocalThread; -import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; import org.junit.jupiter.api.extension.ExtendWith; @@ -29,7 +28,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse; @ExtendWith(RunInFastThreadLocalThreadExtension.class) public class RecyclerFastThreadLocalTest extends RecyclerTest { - @NotNull @Override protected Thread newThread(Runnable runnable) { return new FastThreadLocalThread(runnable); diff --git a/common/src/test/java/io/netty/util/RecyclerTest.java b/common/src/test/java/io/netty/util/RecyclerTest.java index 49359ff962..1ee4c6bd5c 100644 --- a/common/src/test/java/io/netty/util/RecyclerTest.java +++ b/common/src/test/java/io/netty/util/RecyclerTest.java @@ -15,7 +15,6 @@ */ package io.netty.util; -import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; import org.junit.jupiter.api.function.Executable; @@ -55,7 +54,6 @@ public class RecyclerTest { }; } - @NotNull protected Thread newThread(Runnable runnable) { return new Thread(runnable); } @@ -341,7 +339,7 @@ public class RecyclerTest { ExecutorService single = Executors.newSingleThreadExecutor(new ThreadFactory() { @Override - public Thread newThread(@NotNull Runnable r) { + public Thread newThread(Runnable r) { return RecyclerTest.this.newThread(r); } }); -- 2.46.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor