Commit 4945806d authored by Phillip Webb's avatar Phillip Webb

Make `StringSequence.isEmpty()` public

Make `StringSequence.isEmpty()` public for compatibility with JDK 15.

Closes gh-23440
parent be00bbcf
...@@ -72,7 +72,11 @@ final class StringSequence implements CharSequence { ...@@ -72,7 +72,11 @@ final class StringSequence implements CharSequence {
return new StringSequence(this.source, subSequenceStart, subSequenceEnd); return new StringSequence(this.source, subSequenceStart, subSequenceEnd);
} }
boolean isEmpty() { /**
* Returns {@code true} if the sequence is empty. Public to be compatible with JDK 15.
* @return {@code true} if {@link #length()} is {@code 0}, otherwise {@code false}
*/
public boolean isEmpty() {
return length() == 0; return length() == 0;
} }
......
...@@ -42,4 +42,5 @@ ...@@ -42,4 +42,5 @@
<suppress files="SampleJUnitVintageApplicationTests" checks="SpringJUnit5" /> <suppress files="SampleJUnitVintageApplicationTests" checks="SpringJUnit5" />
<suppress files="[\\/]spring-boot-docs[\\/]" checks="SpringJavadoc" message="\@since" /> <suppress files="[\\/]spring-boot-docs[\\/]" checks="SpringJavadoc" message="\@since" />
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="SpringJavadoc" message="\@since" /> <suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="SpringJavadoc" message="\@since" />
<suppress files="StringSequence" checks="SpringMethodVisibility"/>
</suppressions> </suppressions>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment