aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-alm-client
diff options
context:
space:
mode:
authorZipeng WU <zipeng.wu@sonarsource.com>2023-01-10 11:51:59 +0100
committersonartech <sonartech@sonarsource.com>2023-01-12 20:02:51 +0000
commitc6a817468bcd71129f9da2b453a5a91af62df570 (patch)
tree0b20f3dd739bcb89c0e802c2d51724cbe8a7e70e /server/sonar-alm-client
parent2b61542b6a77fdfb62ff5a815856d3babee28a1a (diff)
downloadsonarqube-c6a817468bcd71129f9da2b453a5a91af62df570.tar.gz
sonarqube-c6a817468bcd71129f9da2b453a5a91af62df570.zip
[NO-JIRA] Use record for data classes
Diffstat (limited to 'server/sonar-alm-client')
-rw-r--r--server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubApplicationClient.java63
1 files changed, 0 insertions, 63 deletions
diff --git a/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubApplicationClient.java b/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubApplicationClient.java
index 4cd90cfefba..7446d304ec6 100644
--- a/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubApplicationClient.java
+++ b/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubApplicationClient.java
@@ -21,12 +21,10 @@ package org.sonar.alm.client.github;
import com.google.gson.annotations.SerializedName;
import java.util.List;
-import java.util.Objects;
import java.util.Optional;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
-
import org.sonar.alm.client.github.config.GithubAppConfiguration;
import org.sonar.alm.client.github.security.AccessToken;
import org.sonar.alm.client.github.security.UserAccessToken;
@@ -166,67 +164,6 @@ public interface GithubApplicationClient {
}
}
- @Immutable
- final class RepositoryDetails {
- private final Repository repository;
- private final String description;
- private final String mainBranchName;
- private final String url;
-
- public RepositoryDetails(Repository repository, String description, String mainBranchName, String url) {
- this.repository = repository;
- this.description = description;
- this.mainBranchName = mainBranchName;
- this.url = url;
- }
-
- public Repository getRepository() {
- return repository;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getMainBranchName() {
- return mainBranchName;
- }
-
- public String getUrl() {
- return url;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- RepositoryDetails that = (RepositoryDetails) o;
- return Objects.equals(repository, that.repository) &&
- Objects.equals(description, that.description) &&
- Objects.equals(mainBranchName, that.mainBranchName) &&
- Objects.equals(url, that.url);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(repository, description, mainBranchName, url);
- }
-
- @Override
- public String toString() {
- return "RepositoryDetails{" +
- "repository=" + repository +
- ", description='" + description + '\'' +
- ", mainBranchName='" + mainBranchName + '\'' +
- ", url='" + url + '\'' +
- '}';
- }
- }
-
class Organizations {
private int total;
private List<Organization> organizations;