commit | 790465f9e08ca0d7ebba4ca3c7a8b530fa31e6b8 | [log] [tgz] |
---|---|---|
author | Christian Aistleitner <christian@quelltextlich.at> | Sun Jun 02 16:48:03 2013 +0200 |
committer | Christian Aistleitner <christian@quelltextlich.at> | Mon Jun 17 15:38:26 2013 +0200 |
tree | fbd3ad2d76a9ad492c5abcd3dbf757a62b6b6de2 | |
parent | ec44c85b100abaf33e68bbedeab60a957ad93b04 [diff] |
Switch to IssueExtractor constructor injection to ease mocking Change-Id: I63c717c7e38f647345598d17f0caa52286454ff9
diff --git a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java index 98d40be..970d5c4 100644 --- a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java +++ b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java
@@ -19,11 +19,15 @@ private static final Logger log = LoggerFactory.getLogger( IssueExtractor.class); - @Inject @GerritServerConfig - private Config gerritConfig; + private final Config gerritConfig; + private final String itsName; - @Inject @ItsName - private String itsName; + @Inject + IssueExtractor(@GerritServerConfig Config gerritConfig, + @ItsName String itsName) { + this.gerritConfig = gerritConfig; + this.itsName = itsName; + } /** * Gets issue ids from a string.