diff --git a/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java b/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java index a470afb862..904c718ce9 100644 --- a/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java +++ b/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java @@ -16,7 +16,6 @@ package org.springframework.boot.configurationprocessor; -import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Collections; @@ -107,10 +106,6 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor } } - private void logWarning(String msg) { - this.processingEnv.getMessager().printMessage(Kind.WARNING, msg); - } - @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { @@ -361,9 +356,14 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor inputStream.close(); } } - catch (IOException ex) { + catch (Exception ex) { + logWarning("Unable to merge additional-spring-configuration-metadata.json"); return metadata; } } + private void logWarning(String msg) { + this.processingEnv.getMessager().printMessage(Kind.WARNING, msg); + } + }