Skip to content

Commit acf2955

Browse files
quaffbclozel
authored andcommitted
Ban jetbrains annotations imports
Closes gh-28226
1 parent 8fc744f commit acf2955

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupStep.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
import java.util.function.Consumer;
2121
import java.util.function.Supplier;
2222

23-
import org.jetbrains.annotations.NotNull;
24-
2523
import org.springframework.core.metrics.StartupStep;
24+
import org.springframework.lang.NonNull;
2625

2726
/**
2827
* {@link StartupStep} implementation for the Java Flight Recorder.
@@ -115,7 +114,7 @@ public void add(String key, Supplier<String> value) {
115114
add(key, value.get());
116115
}
117116

118-
@NotNull
117+
@NonNull
119118
@Override
120119
public Iterator<Tag> iterator() {
121120
return new TagsIterator();

src/checkstyle/checkstyle.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@
134134
<property name="regexp" value="true" />
135135
<property name="illegalClasses" value="^org\.hamcrest\..+" />
136136
</module>
137+
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
138+
<property name="id" value="bannedJetbrainsAnnotationsImports"/>
139+
<property name="regexp" value="true" />
140+
<property name="illegalClasses" value="^org\.jetbrains\.annotations\..+" />
141+
</module>
137142

138143
<!-- Javadoc Comments -->
139144
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck">

0 commit comments

Comments
 (0)