From a0c8d1f5b55b241f64f112fe1bc4c410a6b4805a Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Mon, 11 Apr 2016 11:25:15 +0900 Subject: [PATCH] Polish --- .../InfoContributorAutoConfigurationTests.java | 10 +++++----- .../main/asciidoc/appendix-application-properties.adoc | 2 +- .../java/org/springframework/boot/ImageBanner.java | 8 ++++---- .../org/springframework/boot/ImageBannerTests.java | 2 +- .../springframework/boot/SpringApplicationTests.java | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/InfoContributorAutoConfigurationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/InfoContributorAutoConfigurationTests.java index a99ddf0069..929139021a 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/InfoContributorAutoConfigurationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/InfoContributorAutoConfigurationTests.java @@ -124,8 +124,8 @@ public class InfoContributorAutoConfigurationTests { this.context.getBean("buildInfoContributor", InfoContributor.class)); Object build = content.get("build"); assertThat(build).isInstanceOf(Map.class); - Map gitInfo = (Map) build; - assertThat(gitInfo).containsOnlyKeys("group", "artifact"); + Map buildInfo = (Map) build; + assertThat(buildInfo).containsOnlyKeys("group", "artifact"); } @SuppressWarnings("unchecked") @@ -136,9 +136,9 @@ public class InfoContributorAutoConfigurationTests { this.context.getBean("buildInfoContributor", InfoContributor.class)); Object build = content.get("build"); assertThat(build).isInstanceOf(Map.class); - Map gitInfo = (Map) build; - assertThat(gitInfo).containsOnlyKeys("group", "artifact", "foo"); - assertThat(gitInfo.get("foo")).isEqualTo("bar"); + Map buildInfo = (Map) build; + assertThat(buildInfo).containsOnlyKeys("group", "artifact", "foo"); + assertThat(buildInfo.get("foo")).isEqualTo("bar"); } @Test diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 9e755165a7..c911c8f8da 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -977,7 +977,7 @@ content into your application; rather pick only the properties that you need. management.health.solr.enabled=true # Enable Solr health check. management.health.status.order=DOWN, OUT_OF_SERVICE, UNKNOWN, UP # Comma-separated list of health statuses in order of severity. - # INFO CONTRIBUTORS + # INFO CONTRIBUTORS ({sc-spring-boot-actuator}/autoconfigure/InfoContributorProperties.{sc-ext}[InfoContributorProperties]) management.info.build.enabled=true # Enable build info. management.info.build.mode=simple # Mode to use to expose build information. management.info.defaults.enabled=true # Enable default info contributors. diff --git a/spring-boot/src/main/java/org/springframework/boot/ImageBanner.java b/spring-boot/src/main/java/org/springframework/boot/ImageBanner.java index 9c32a539ae..dea1a29af8 100644 --- a/spring-boot/src/main/java/org/springframework/boot/ImageBanner.java +++ b/spring-boot/src/main/java/org/springframework/boot/ImageBanner.java @@ -94,18 +94,18 @@ public class ImageBanner implements Banner { PropertyResolver properties = new RelaxedPropertyResolver(environment, "banner.image."); int width = properties.getProperty("width", Integer.class, 76); - int heigth = properties.getProperty("height", Integer.class, 0); + int height = properties.getProperty("height", Integer.class, 0); int margin = properties.getProperty("margin", Integer.class, 2); boolean invert = properties.getProperty("invert", Boolean.class, false); - BufferedImage image = readImage(width, heigth); + BufferedImage image = readImage(width, height); printBanner(image, margin, invert, out); } - private BufferedImage readImage(int width, int heigth) throws IOException { + private BufferedImage readImage(int width, int height) throws IOException { InputStream inputStream = this.image.getInputStream(); try { BufferedImage image = ImageIO.read(inputStream); - return resizeImage(image, width, heigth); + return resizeImage(image, width, height); } finally { inputStream.close(); diff --git a/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java b/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java index f8fca5830c..278819d5f8 100644 --- a/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java @@ -157,7 +157,7 @@ public class ImageBannerTests { } @Test - public void printBannerWhenHasMarginPropertShouldPrintSizedMargin() throws Exception { + public void printBannerWhenHasMarginPropertyShouldPrintSizedMargin() throws Exception { AnsiOutput.setEnabled(AnsiOutput.Enabled.NEVER); String banner = printBanner("large.gif", "banner.image.margin=4"); String[] lines = banner.split(NEW_LINE); diff --git a/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index 47f8654bf2..5777d98fd8 100644 --- a/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -1129,7 +1129,7 @@ public class SpringApplicationTests { @Override public Resource getResource(String path) { Resource resource = this.resources.get(path); - return (resource == null ? new ClassPathResource("doesnotexit") : resource); + return (resource == null ? new ClassPathResource("doesnotexist") : resource); } @Override