diff options
author | Benjamin Campomenosi <benjamin.campomenosi@sonarsource.com> | 2022-09-02 10:59:16 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-09-05 20:02:56 +0000 |
commit | c0ac92d74288cd501977d2bb661c414872236716 (patch) | |
tree | a343a0f7370695244811ca4b06f057b2caf12908 /server/sonar-ce-task-projectanalysis | |
parent | cfb2e265481817c41725eb6b6f6f4e915d4ba7a0 (diff) | |
download | sonarqube-c0ac92d74288cd501977d2bb661c414872236716.tar.gz sonarqube-c0ac92d74288cd501977d2bb661c414872236716.zip |
SONAR-17264 accept 404 response code when checking if user has access to github scanning alerts
fix some code smells
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
2 files changed, 23 insertions, 20 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/locations/flow/TextRange.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/locations/flow/TextRange.java index 16e336cf764..2a5a7a9adc9 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/locations/flow/TextRange.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/locations/flow/TextRange.java @@ -19,8 +19,6 @@ */ package org.sonar.ce.task.projectanalysis.locations.flow; -import java.util.Objects; - public class TextRange { private int startLine; private int startLineOffset; @@ -72,22 +70,4 @@ public class TextRange { this.hash = hash; } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TextRange textRange = (TextRange) o; - return getStartLine() == textRange.getStartLine() && getStartLineOffset() == textRange.getStartLineOffset() && getEndLine() == textRange.getEndLine() - && getEndLineOffset() == textRange.getEndLineOffset() && Objects.equals(getHash(), textRange.getHash()); - } - - @Override - public int hashCode() { - return Objects.hash(getStartLine(), getStartLineOffset(), getEndLine(), getEndLineOffset(), getHash()); - } - } diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/locations/flow/package-info.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/locations/flow/package-info.java new file mode 100644 index 00000000000..36b45170b77 --- /dev/null +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/locations/flow/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2022 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.ce.task.projectanalysis.locations.flow; + +import javax.annotation.ParametersAreNonnullByDefault; |