Don't fail build on merge failure

Be more lenient when processing additional metadata json files.

Fixes gh-2287
Closes gh-2288
pull/2300/head
Kris De Volder 10 years ago committed by Phillip Webb
parent 7c29c96da6
commit 2dfa424246

@ -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<? extends TypeElement> 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);
}
}

Loading…
Cancel
Save