Skip to content

Commit

Permalink
[NO-JIRA] Fix reported code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani authored and sonartech committed Jan 28, 2022
1 parent 91e059b commit 20afbda
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private Period toPeriod(NewCodePeriodType type, @Nullable String value, DbSessio
}
}

private Period resolveByReferenceBranch(String value) {
private static Period resolveByReferenceBranch(String value) {
return newPeriod(NewCodePeriodType.REFERENCE_BRANCH, value, null);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
*/
package org.sonar.db.ce;

import java.util.HashSet;
import java.util.Set;

import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableSet;

public class CeTaskCharacteristicDto {

public static final String BRANCH_KEY = "branch";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* SonarQube
* Copyright (C) 2009-2021 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.server.monitoring;

import javax.annotation.ParametersAreNonnullByDefault;
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Stream;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.sonar.api.SonarQubeSide;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
import org.sonar.scanner.scan.branch.BranchConfiguration;

import static java.lang.Math.max;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableSet;
import static java.util.stream.Collectors.toList;
import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_DATA_KEY;
import static org.sonar.api.measures.CoreMetrics.LINES_KEY;
Expand Down

0 comments on commit 20afbda

Please sign in to comment.