Skip to content

Commit

Permalink
[JENKINS-45322] Avoid getFullName() computation unless required
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Jul 14, 2017
1 parent 87c261f commit 7f970b8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/main/java/jenkins/branch/OrganizationFolder.java
Expand Up @@ -946,13 +946,15 @@ public void onSCMHeadEvent(SCMHeadEvent<?> event) {
try {
for (OrganizationFolder p : Jenkins.getActiveInstance().getAllItems(OrganizationFolder.class)) {
if (!p.isBuildable()) {
LOGGER.log(Level.FINER,
"{0} {1} {2,date} {2,time}: Ignoring {3} because it is disabled",
new Object[]{
globalEventDescription,
event.getType().name(), event.getTimestamp(), p.getFullName()
}
);
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.log(Level.FINER,
"{0} {1} {2,date} {2,time}: Ignoring {3} because it is disabled",
new Object[]{
globalEventDescription,
event.getType().name(), event.getTimestamp(), p.getFullName()
}
);
}
continue;
}
// we want to catch when a branch is created / updated and consequently becomes eligible
Expand Down

0 comments on commit 7f970b8

Please sign in to comment.