From a6e6e1e07a060e2bb0178af0558e23c4897a3be5 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 15 Aug 2014 10:14:03 -0700 Subject: [PATCH] Rename Banner.write method to printBanner Rename Banner.write to Banner.printBanner for consistency with the now deprecated SpringApplication.printBanner method. --- .../src/main/java/org/springframework/boot/Banner.java | 4 ++-- .../main/java/org/springframework/boot/SpringApplication.java | 4 ++-- .../main/java/org/springframework/boot/SpringBootBanner.java | 2 +- .../src/test/java/org/springframework/boot/BannerTests.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/Banner.java b/spring-boot/src/main/java/org/springframework/boot/Banner.java index c32af83815..b95e4b5006 100644 --- a/spring-boot/src/main/java/org/springframework/boot/Banner.java +++ b/spring-boot/src/main/java/org/springframework/boot/Banner.java @@ -30,10 +30,10 @@ import org.springframework.core.env.Environment; public interface Banner { /** - * Write the banner to the specified print stream. + * Print the banner to the specified print stream. * @param environment the spring environment * @param out the output print stream */ - void write(Environment environment, PrintStream out); + void printBanner(Environment environment, PrintStream out); } diff --git a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index ca6c50988d..8ef39f1994 100644 --- a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -487,7 +487,7 @@ public class SpringApplication { } if (this.banner != null) { - this.banner.write(environment, System.out); + this.banner.printBanner(environment, System.out); return; } @@ -517,7 +517,7 @@ public class SpringApplication { */ @Deprecated protected void printBanner() { - DEFAULT_BANNER.write(null, System.out); + DEFAULT_BANNER.printBanner(null, System.out); } /** diff --git a/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java b/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java index 1fb5645210..4bd6a1594b 100644 --- a/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java +++ b/spring-boot/src/main/java/org/springframework/boot/SpringBootBanner.java @@ -45,7 +45,7 @@ class SpringBootBanner implements Banner { private static final int STRAP_LINE_SIZE = 42; @Override - public void write(Environment environment, PrintStream printStream) { + public void printBanner(Environment environment, PrintStream printStream) { for (String line : BANNER) { printStream.println(line); } diff --git a/spring-boot/src/test/java/org/springframework/boot/BannerTests.java b/spring-boot/src/test/java/org/springframework/boot/BannerTests.java index eb2a4caa8d..02a218512e 100644 --- a/spring-boot/src/test/java/org/springframework/boot/BannerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/BannerTests.java @@ -58,7 +58,7 @@ public class BannerTests { static class DummyBanner implements Banner { @Override - public void write(Environment environment, PrintStream out) { + public void printBanner(Environment environment, PrintStream out) { out.println("My Banner"); }