Skip to content

Commit f202f17

Browse files
author
Vladimir Kotal
committed
refactor to use RuntimeEnvironment variable
1 parent f34ca2f commit f202f17

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/org/opensolaris/opengrok/history/Repository.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,16 +540,18 @@ static Boolean checkCmd(String... args) {
540540
* @see #RepoCommand
541541
*/
542542
protected String ensureCommand(String propertyKey, String fallbackCommand) {
543+
RuntimeEnvironment env = RuntimeEnvironment.getInstance();
544+
543545
if (RepoCommand != null) {
544546
return RepoCommand;
545547
}
546-
RepoCommand = RuntimeEnvironment.getInstance()
547-
.getRepoCmd(this.getClass().getCanonicalName());
548+
549+
RepoCommand = env.getRepoCmd(this.getClass().getCanonicalName());
548550
if (RepoCommand == null) {
549551
RepoCommand = System.getProperty(propertyKey, fallbackCommand);
550-
RuntimeEnvironment.getInstance()
551-
.setRepoCmd(this.getClass().getCanonicalName(), RepoCommand);
552+
env.setRepoCmd(this.getClass().getCanonicalName(), RepoCommand);
552553
}
554+
553555
return RepoCommand;
554556
}
555557

0 commit comments

Comments
 (0)