Skip to content

Commit

Permalink
[JENKINS-34522] Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Mar 5, 2017
1 parent 78ddb03 commit 1f52c5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/jenkins/branch/TaskNounUiTextProvider.java
Expand Up @@ -59,9 +59,12 @@ public TaskNounUiTextProvider() {
try {
Field taskNoun = AbstractItem.class.getDeclaredField("TASK_NOUN");
message = (Message<AbstractItem>) taskNoun.get(null);
} catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {
} catch (NoSuchFieldException e) {
LOGGER.log(Level.FINE, "This version of Jenkins does not have AbstractItem.TASK_NOUN", e);
message = null;
} catch (IllegalAccessException | ClassCastException e) {
LOGGER.log(Level.WARNING, "Could not access AbstractItem.TASK_NOUN by reflection", e);
message = null;
}
this.taskNoun = message;
}
Expand Down

0 comments on commit 1f52c5a

Please sign in to comment.