Skip to content

Commit

Permalink
Merge pull request spring-projects#40524 from chaewss
Browse files Browse the repository at this point in the history
* pr/40524:
  Remove unnecessary null check for expectedDeprecationMessages

Closes spring-projectsgh-40524
  • Loading branch information
mhalbritter committed Apr 26, 2024
2 parents 83f6922 + d51282a commit 6c3a21f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,8 @@ public BuildResult build(String... arguments) {
if (this.expectDeprecationWarnings == null || (this.gradleVersion != null
&& this.expectDeprecationWarnings.compareTo(GradleVersion.version(this.gradleVersion)) > 0)) {
String buildOutput = result.getOutput();
if (this.expectedDeprecationMessages != null) {
for (String message : this.expectedDeprecationMessages) {
buildOutput = buildOutput.replaceAll(message, "");
}
for (String message : this.expectedDeprecationMessages) {
buildOutput = buildOutput.replaceAll(message, "");
}
assertThat(buildOutput).doesNotContainIgnoringCase("deprecated");
}
Expand Down

0 comments on commit 6c3a21f

Please sign in to comment.