Skip to content

Commit f7f1028

Browse files
committed
Remove superfluous @nonnull declarations
1 parent 1cb0c7c commit f7f1028

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@
2121
import java.util.function.Supplier;
2222

2323
import org.springframework.core.metrics.StartupStep;
24-
import org.springframework.lang.NonNull;
2524

2625
/**
2726
* {@link StartupStep} implementation for the Java Flight Recorder.
27+
*
2828
* <p>This variant delegates to a {@link FlightRecorderStartupEvent JFR event extension}
2929
* to collect and record data in Java Flight Recorder.
3030
*
@@ -114,12 +114,12 @@ public void add(String key, Supplier<String> value) {
114114
add(key, value.get());
115115
}
116116

117-
@NonNull
118117
@Override
119118
public Iterator<Tag> iterator() {
120119
return new TagsIterator();
121120
}
122121

122+
123123
private class TagsIterator implements Iterator<Tag> {
124124

125125
private int idx = 0;

Diff for: spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -60,7 +60,6 @@
6060

6161
import org.springframework.http.HttpHeaders;
6262
import org.springframework.http.MediaType;
63-
import org.springframework.lang.NonNull;
6463
import org.springframework.lang.Nullable;
6564
import org.springframework.util.Assert;
6665
import org.springframework.util.LinkedCaseInsensitiveMap;
@@ -990,7 +989,7 @@ public void setCookies(@Nullable Cookie... cookies) {
990989
}
991990
}
992991

993-
private static String encodeCookies(@NonNull Cookie... cookies) {
992+
private static String encodeCookies(Cookie... cookies) {
994993
return Arrays.stream(cookies)
995994
.map(c -> c.getName() + '=' + (c.getValue() == null ? "" : c.getValue()))
996995
.collect(Collectors.joining("; "));

Diff for: spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,6 @@
3131
import org.springframework.core.io.ClassPathResource;
3232
import org.springframework.core.io.Resource;
3333
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
34-
import org.springframework.lang.NonNull;
3534
import org.springframework.lang.Nullable;
3635
import org.springframework.test.context.TestContext;
3736
import org.springframework.test.context.TestContextAnnotationUtils;
@@ -280,7 +279,6 @@ private void executeSqlScripts(
280279
}
281280
}
282281

283-
@NonNull
284282
private ResourceDatabasePopulator createDatabasePopulator(MergedSqlConfig mergedSqlConfig) {
285283
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
286284
populator.setSqlScriptEncoding(mergedSqlConfig.getEncoding());

Diff for: spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletRequest.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -61,7 +61,6 @@
6161

6262
import org.springframework.http.HttpHeaders;
6363
import org.springframework.http.MediaType;
64-
import org.springframework.lang.NonNull;
6564
import org.springframework.lang.Nullable;
6665
import org.springframework.util.Assert;
6766
import org.springframework.util.LinkedCaseInsensitiveMap;
@@ -993,7 +992,7 @@ public void setCookies(@Nullable Cookie... cookies) {
993992
}
994993
}
995994

996-
private static String encodeCookies(@NonNull Cookie... cookies) {
995+
private static String encodeCookies(Cookie... cookies) {
997996
return Arrays.stream(cookies)
998997
.map(c -> c.getName() + '=' + (c.getValue() == null ? "" : c.getValue()))
999998
.collect(Collectors.joining("; "));

0 commit comments

Comments
 (0)