Skip to content

Commit

Permalink
Merge pull request #94 from batmat/fix-weird-secu-issue-gclogs
Browse files Browse the repository at this point in the history
Simply ignore if the GC logging options are not enabled
  • Loading branch information
batmat committed Dec 7, 2016
2 parents 5f2f23d + 4f015f0 commit ba3a503
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/main/java/com/cloudbees/jenkins/support/impl/GCLogs.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,12 @@ public String getDisplayName() {
return "Garbage Collection Logs";
}

@Override
public boolean isEnabled() {
boolean gcLogsConfigured = getGcLogFileLocation() != null;
LOGGER.fine("GC logs configured: " + gcLogsConfigured);
return super.isEnabled() && gcLogsConfigured;
}

@Override
public void addContents(@NonNull Container result) {
LOGGER.fine("Trying to gather GC logs for support bundle");
String gcLogFileLocation = getGcLogFileLocation();
if (gcLogFileLocation == null) {
LOGGER.config("No GC logging enabled, nothing about it will be retrieved for support bundle.");
return;
}

Expand Down

0 comments on commit ba3a503

Please sign in to comment.