Skip to content

Commit 52d7d9d

Browse files
committed
feat(config): fix git.properties NPE
1 parent d5d9f46 commit 52d7d9d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • framework/src/main/java/org/tron/core/config/args

framework/src/main/java/org/tron/core/config/args/Args.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ private static String getCommitIdAbbrev() {
342342
try {
343343
InputStream in = Thread.currentThread()
344344
.getContextClassLoader().getResourceAsStream("git.properties");
345+
if (in == null) {
346+
logger.warn("git.properties not found on classpath");
347+
return "";
348+
}
345349
properties.load(in);
346350
} catch (IOException e) {
347351
logger.warn("Load resource failed,git.properties {}", e.getMessage());

0 commit comments

Comments
 (0)