Skip to content

Commit

Permalink
Don't fail build on merge failure
Browse files Browse the repository at this point in the history
Be more lenient when processing additional metadata json files.

Fixes spring-projectsgh-2287
Closes spring-projectsgh-2288
  • Loading branch information
kdvolder authored and philwebb committed Jan 6, 2015
1 parent 7c29c96 commit 2dfa424
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -107,10 +106,6 @@ public synchronized void init(ProcessingEnvironment env) {
}
}

private void logWarning(String msg) {
this.processingEnv.getMessager().printMessage(Kind.WARNING, msg);
}

@Override
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) {
Expand Down Expand Up @@ -361,9 +356,14 @@ private ConfigurationMetadata mergeManualMetadata(ConfigurationMetadata metadata
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);
}

}

0 comments on commit 2dfa424

Please sign in to comment.