Skip to content

Commit 8b68400

Browse files
committed
Remove use of @nullable from copy of SortedProperties
Rationale: @nullable is not visible in the spring-context-indexer project.
1 parent 42c0d8e commit 8b68400

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spring-context-indexer/src/main/java/org/springframework/context/index/processor/SortedProperties.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
import java.util.Set;
3131
import java.util.TreeSet;
3232

33-
import org.springframework.lang.Nullable;
34-
3533
/**
3634
* Specialization of {@link Properties} that sorts properties alphanumerically
3735
* based on their keys.
@@ -87,7 +85,7 @@ class SortedProperties extends Properties {
8785

8886

8987
@Override
90-
public void store(OutputStream out, @Nullable String comments) throws IOException {
88+
public void store(OutputStream out, String comments) throws IOException {
9189
ByteArrayOutputStream baos = new ByteArrayOutputStream();
9290
super.store(baos, (this.omitComments ? null : comments));
9391
String contents = new String(baos.toByteArray(), StandardCharsets.ISO_8859_1);
@@ -99,7 +97,7 @@ public void store(OutputStream out, @Nullable String comments) throws IOExceptio
9997
}
10098

10199
@Override
102-
public void store(Writer writer, @Nullable String comments) throws IOException {
100+
public void store(Writer writer, String comments) throws IOException {
103101
StringWriter stringWriter = new StringWriter();
104102
super.store(stringWriter, (this.omitComments ? null : comments));
105103
String contents = stringWriter.toString();
@@ -111,12 +109,12 @@ public void store(Writer writer, @Nullable String comments) throws IOException {
111109
}
112110

113111
@Override
114-
public void storeToXML(OutputStream out, @Nullable String comments) throws IOException {
112+
public void storeToXML(OutputStream out, String comments) throws IOException {
115113
super.storeToXML(out, (this.omitComments ? null : comments));
116114
}
117115

118116
@Override
119-
public void storeToXML(OutputStream out, @Nullable String comments, String encoding) throws IOException {
117+
public void storeToXML(OutputStream out, String comments, String encoding) throws IOException {
120118
super.storeToXML(out, (this.omitComments ? null : comments), encoding);
121119
}
122120

0 commit comments

Comments
 (0)