From ec00b37ab512b647c008bd930158e55d3e8e3d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommy=20Tynj=C3=A4?= Date: Mon, 19 Nov 2018 19:42:24 +0100 Subject: [PATCH] Refactored: Inlined constant condition * Moved static final variable above instance fields --- .../se/diabol/jenkins/pipeline/domain/Change.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/se/diabol/jenkins/pipeline/domain/Change.java b/src/main/java/se/diabol/jenkins/pipeline/domain/Change.java index c91b367de..6f8fce114 100644 --- a/src/main/java/se/diabol/jenkins/pipeline/domain/Change.java +++ b/src/main/java/se/diabol/jenkins/pipeline/domain/Change.java @@ -33,14 +33,14 @@ @ExportedBean(defaultVisibility = AbstractItem.VISIBILITY) public class Change { + + private static final Logger LOG = Logger.getLogger(Change.class.getName()); + private final UserInfo author; private final String message; private final String commitId; private final String changeLink; - private static final Logger LOG = Logger.getLogger(Change.class.getName()); - - public Change(UserInfo author, String message, String commitId, String changeLink) { this.author = author; this.message = message; @@ -115,13 +115,9 @@ public static List getChanges(List entries : changes) { for (ChangeLogSet.Entry entry : entries) { UserInfo user = UserInfo.getUser(entry.getAuthor()); - String changeLink = null; - result.add(new Change(user, entry.getMsgAnnotated(), entry.getCommitId(), changeLink)); + result.add(new Change(user, entry.getMsgAnnotated(), entry.getCommitId(), null)); } } return result; } - - - }