Skip to content

Commit edd49a2

Browse files
committed
Remove redundant @NullMarked on classes in annotated packages
Resolves gh-6980
1 parent 15afed4 commit edd49a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3
-86
lines changed

micrometer-core/src/main/java/io/micrometer/core/aop/CountedAspect.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.aspectj.lang.annotation.Around;
2424
import org.aspectj.lang.annotation.Aspect;
2525
import org.aspectj.lang.reflect.MethodSignature;
26-
import org.jspecify.annotations.NullMarked;
2726
import org.jspecify.annotations.Nullable;
2827

2928
import java.lang.reflect.Method;
@@ -77,7 +76,6 @@
7776
* @see Counted
7877
*/
7978
@Aspect
80-
@NullMarked
8179
public class CountedAspect {
8280

8381
private static final WarnThenDebugLogger WARN_THEN_DEBUG_LOGGER = new WarnThenDebugLogger(CountedAspect.class);

micrometer-core/src/main/java/io/micrometer/core/aop/TimedAspect.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.aspectj.lang.annotation.Around;
2626
import org.aspectj.lang.annotation.Aspect;
2727
import org.aspectj.lang.reflect.MethodSignature;
28-
import org.jspecify.annotations.NullMarked;
2928
import org.jspecify.annotations.Nullable;
3029

3130
import java.lang.reflect.Method;
@@ -87,7 +86,6 @@
8786
* @since 1.0.0
8887
*/
8988
@Aspect
90-
@NullMarked
9189
@Incubating(since = "1.0.0")
9290
public class TimedAspect {
9391

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CacheMeterBinder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import io.micrometer.core.instrument.*;
1919
import io.micrometer.core.instrument.binder.MeterBinder;
20-
import org.jspecify.annotations.NullMarked;
2120
import org.jspecify.annotations.Nullable;
2221

2322
import java.lang.ref.WeakReference;
@@ -33,7 +32,6 @@
3332
*
3433
* @author Jon Schneider
3534
*/
36-
@NullMarked
3735
public abstract class CacheMeterBinder<C> implements MeterBinder {
3836

3937
private static final String DESCRIPTION_CACHE_GETS = "The number of times cache lookup methods have returned a cached (hit) or uncached (newly loaded or null) value (miss).";

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import io.micrometer.common.util.internal.logging.InternalLogger;
2424
import io.micrometer.common.util.internal.logging.InternalLoggerFactory;
2525
import io.micrometer.core.instrument.*;
26-
import org.jspecify.annotations.NullMarked;
2726
import org.jspecify.annotations.Nullable;
2827

2928
import java.util.concurrent.TimeUnit;
@@ -43,7 +42,6 @@
4342
* @author Clint Checketts
4443
* @see CaffeineStatsCounter
4544
*/
46-
@NullMarked
4745
public class CaffeineCacheMetrics<K, V extends @Nullable Object, C extends Cache<K, V>> extends CacheMeterBinder<C> {
4846

4947
private static final String DESCRIPTION_CACHE_LOAD = "The number of times cache lookup methods have successfully loaded a new value or failed to load a new value, either because no value was found or an exception was thrown while loading";

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineStatsCounter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.github.benmanes.caffeine.cache.stats.CacheStats;
2121
import com.github.benmanes.caffeine.cache.stats.StatsCounter;
2222
import io.micrometer.core.instrument.*;
23-
import org.jspecify.annotations.NullMarked;
2423

2524
import java.util.Arrays;
2625
import java.util.EnumMap;
@@ -51,7 +50,6 @@
5150
* @see CaffeineCacheMetrics
5251
* @since 1.7.0
5352
*/
54-
@NullMarked
5553
public final class CaffeineStatsCounter implements StatsCounter {
5654

5755
private static final String DESCRIPTION_CACHE_GETS = "The number of times cache lookup methods have returned a cached (hit) or uncached (newly loaded) value (miss).";

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/EhCache2Metrics.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import io.micrometer.core.instrument.binder.BaseUnits;
2020
import net.sf.ehcache.Ehcache;
2121
import net.sf.ehcache.statistics.StatisticsGateway;
22-
import org.jspecify.annotations.NullMarked;
2322
import org.jspecify.annotations.Nullable;
2423

2524
import java.util.function.Function;
@@ -31,7 +30,6 @@
3130
*
3231
* @author Jon Schneider
3332
*/
34-
@NullMarked
3533
public class EhCache2Metrics extends CacheMeterBinder<Ehcache> {
3634

3735
private static final String DESCRIPTION_CACHE_PUTS_ADDED = "Cache puts (added or updated)";

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/GuavaCacheMetrics.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.google.common.cache.CacheBuilder;
2020
import com.google.common.cache.LoadingCache;
2121
import io.micrometer.core.instrument.*;
22-
import org.jspecify.annotations.NullMarked;
2322
import org.jspecify.annotations.Nullable;
2423

2524
import java.util.concurrent.TimeUnit;
@@ -29,7 +28,6 @@
2928
/**
3029
* @author Jon Schneider
3130
*/
32-
@NullMarked
3331
public class GuavaCacheMetrics<K, V, C extends Cache<K, V>> extends CacheMeterBinder<C> {
3432

3533
private static final String DESCRIPTION_CACHE_LOAD = "The number of times cache lookup methods have successfully loaded a new value or failed to load a new value because an exception was thrown while loading";

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/HazelcastCacheMetrics.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import io.micrometer.core.instrument.*;
1919
import io.micrometer.core.instrument.binder.BaseUnits;
2020
import io.micrometer.core.instrument.binder.cache.HazelcastIMapAdapter.LocalMapStats;
21-
import org.jspecify.annotations.NullMarked;
2221
import org.jspecify.annotations.Nullable;
2322

2423
import java.util.Objects;
@@ -32,7 +31,6 @@
3231
*
3332
* @author Jon Schneider
3433
*/
35-
@NullMarked
3634
public class HazelcastCacheMetrics extends CacheMeterBinder<Object> {
3735

3836
private static final String DESCRIPTION_CACHE_ENTRIES = "The number of entries held by this member";

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/JCacheMetrics.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import io.micrometer.core.instrument.*;
1919
import io.micrometer.core.instrument.config.InvalidConfigurationException;
20-
import org.jspecify.annotations.NullMarked;
2120
import org.jspecify.annotations.Nullable;
2221

2322
import javax.cache.Cache;
@@ -35,7 +34,6 @@
3534
*
3635
* @author Jon Schneider
3736
*/
38-
@NullMarked
3937
public class JCacheMetrics<K, V, C extends Cache<K, V>> extends CacheMeterBinder<C> {
4038

4139
// VisibleForTesting

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/db/DatabaseTableMetrics.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import io.micrometer.core.instrument.Tags;
2222
import io.micrometer.core.instrument.binder.BaseUnits;
2323
import io.micrometer.core.instrument.binder.MeterBinder;
24-
import org.jspecify.annotations.NullMarked;
2524

2625
import javax.sql.DataSource;
2726
import java.sql.Connection;
@@ -33,7 +32,6 @@
3332
/**
3433
* @author Jon Schneider
3534
*/
36-
@NullMarked
3735
public class DatabaseTableMetrics implements MeterBinder {
3836

3937
private final DataSource dataSource;

0 commit comments

Comments
 (0)