add trycatch for load git.properties failure

This commit is contained in:
heavyrain.lee
2019-05-18 14:12:54 +08:00
parent cfc97e602e
commit 0ff21e70b5
@@ -63,8 +63,11 @@ public class GitRepositoryState {
public static GitRepositoryState getGitRepositoryState() throws IOException {
Properties properties = new Properties();
properties.load(new FileInputStream("config/git.properties"));
// properties.load(GitRepositoryState.class.getClassLoader().getResourceAsStream("config/git.properties"));
try {
properties.load(new FileInputStream("config/git.properties"));
} catch (IOException e) {
}
GitRepositoryState gitRepositoryState = new GitRepositoryState(properties);
return gitRepositoryState;
}