Skip to content

Commit

Permalink
TS-31571 NPEs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
stahlbauer committed Nov 5, 2024
1 parent 1a36e4c commit 6eec763
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions agent/src/main/java/com/teamscale/jacoco/agent/AgentBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ void registerShutdownHook() {
stopServer();
prepareShutdown();
logger.info("CQSE JaCoCo agent successfully shut down.");
} catch (Exception e) {
logger.error("Exception during agent shutdown.", e);
} finally {
// Try to flush logging resources also in case of an exception during shutdown
PreMain.closeLoggingResources();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ private Properties createServerProperties() {
Properties serverProperties = new Properties();
serverProperties.setProperty(PROJECT.name(), teamscaleServer.project);
serverProperties.setProperty(PARTITION.name(), teamscaleServer.partition);
serverProperties.setProperty(COMMIT.name(), teamscaleServer.commit.toString());
if (teamscaleServer.commit != null) {
serverProperties.setProperty(COMMIT.name(), teamscaleServer.commit.toString());
}
serverProperties.setProperty(REVISION.name(), Strings.nullToEmpty(teamscaleServer.revision));
serverProperties.setProperty(REPOSITORY.name(), Strings.nullToEmpty(teamscaleServer.repository));
serverProperties.setProperty(MESSAGE.name(), teamscaleServer.getMessage());
Expand Down

0 comments on commit 6eec763

Please sign in to comment.