diff --git a/spring-context-indexer/src/main/java/org/springframework/context/index/processor/SortedProperties.java b/spring-context-indexer/src/main/java/org/springframework/context/index/processor/SortedProperties.java index f6b0fe49f7..0281cf4b68 100644 --- a/spring-context-indexer/src/main/java/org/springframework/context/index/processor/SortedProperties.java +++ b/spring-context-indexer/src/main/java/org/springframework/context/index/processor/SortedProperties.java @@ -30,8 +30,6 @@ import java.util.Properties; import java.util.Set; import java.util.TreeSet; -import org.springframework.lang.Nullable; - /** * Specialization of {@link Properties} that sorts properties alphanumerically * based on their keys. @@ -87,7 +85,7 @@ class SortedProperties extends Properties { @Override - public void store(OutputStream out, @Nullable String comments) throws IOException { + public void store(OutputStream out, String comments) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); super.store(baos, (this.omitComments ? null : comments)); String contents = new String(baos.toByteArray(), StandardCharsets.ISO_8859_1); @@ -99,7 +97,7 @@ class SortedProperties extends Properties { } @Override - public void store(Writer writer, @Nullable String comments) throws IOException { + public void store(Writer writer, String comments) throws IOException { StringWriter stringWriter = new StringWriter(); super.store(stringWriter, (this.omitComments ? null : comments)); String contents = stringWriter.toString(); @@ -111,12 +109,12 @@ class SortedProperties extends Properties { } @Override - public void storeToXML(OutputStream out, @Nullable String comments) throws IOException { + public void storeToXML(OutputStream out, String comments) throws IOException { super.storeToXML(out, (this.omitComments ? null : comments)); } @Override - public void storeToXML(OutputStream out, @Nullable String comments, String encoding) throws IOException { + public void storeToXML(OutputStream out, String comments, String encoding) throws IOException { super.storeToXML(out, (this.omitComments ? null : comments), encoding); }