Expose GitHubUser fields as public final
The GitHubUser fields are final and can be safely exposed
as public final fields, without having to use Lombok
Getter.
Change-Id: Ief0a4151669c1f86025051141990eb05569a3c82
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitHubUser.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitHubUser.java
index 2109ea9..606cd96 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitHubUser.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitHubUser.java
@@ -17,14 +17,13 @@
import com.google.common.base.Optional;
import com.google.common.base.Strings;
import java.io.IOException;
-import lombok.Getter;
import org.kohsuke.github.GHUser;
import org.kohsuke.github.GitUser;
public class GitHubUser {
- @Getter private final String login;
- @Getter private final String name;
- @Getter private final String email;
+ public final String login;
+ public final String name;
+ public final String email;
private GitHubUser(GHUser gitHubUser, GitUser author) throws IOException {
this.login = initLogin(gitHubUser).or(generateLogin(author.getName()));
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestImportJob.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestImportJob.java
index da16dc2..6734e98 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestImportJob.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestImportJob.java
@@ -205,7 +205,7 @@
private com.google.gerrit.entities.Account.Id getOrRegisterAccount(GitHubUser author)
throws BadRequestException, ResourceConflictException, UnprocessableEntityException,
IOException, ConfigInvalidException {
- return getOrRegisterAccount(author.getLogin(), author.getName(), author.getEmail());
+ return getOrRegisterAccount(author.login, author.name, author.email);
}
private com.google.gerrit.entities.Account.Id getOrRegisterAccount(