Browse Source

Remove use of @Nullable from copy of SortedProperties

Rationale: @Nullable is not visible in the spring-context-indexer
project.
pull/23119/head
Sam Brannen 5 years ago
parent
commit
8b68400bbe
  1. 10
      spring-context-indexer/src/main/java/org/springframework/context/index/processor/SortedProperties.java

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

@ -30,8 +30,6 @@ import java.util.Properties; @@ -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 { @@ -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 { @@ -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 { @@ -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);
}

Loading…
Cancel
Save