Browse Source

Remove unnecessary null check for expectedDeprecationMessages

See gh-40524
3.1.x
chaewss 2 years ago committed by Moritz Halbritter
parent
commit
d51282aff5
  1. 6
      spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java

6
spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java

@ -199,10 +199,8 @@ public class GradleBuild { @@ -199,10 +199,8 @@ public class GradleBuild {
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");
}

Loading…
Cancel
Save