From 8cb985168fd1fbd342b47f42c33ecbd111b63e50 Mon Sep 17 00:00:00 2001 From: Klaudio Sinani Date: Tue, 19 Jul 2022 14:08:47 +0200 Subject: [PATCH] [NO-JIRA] Fix code smells --- .../migration/version/v96/package-info.java | 24 +++++++++++++++++++ .../server/user/AbstractUserSession.java | 1 - .../usertoken/notification/package-info.java | 24 +++++++++++++++++++ .../duplication/ws/ShowResponseBuilder.java | 1 - 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/package-info.java create mode 100644 server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/package-info.java diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/package-info.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/package-info.java new file mode 100644 index 00000000000..ace0316c52c --- /dev/null +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/package-info.java @@ -0,0 +1,24 @@ +/* + * 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.server.platform.db.migration.version.v96; + +import javax.annotation.ParametersAreNonnullByDefault; + diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/AbstractUserSession.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/AbstractUserSession.java index d361e8b385e..2a8ea7d25f7 100644 --- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/AbstractUserSession.java +++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/AbstractUserSession.java @@ -19,7 +19,6 @@ */ package org.sonar.server.user; -import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Optional; diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/package-info.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/package-info.java new file mode 100644 index 00000000000..8765ffa39a1 --- /dev/null +++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/usertoken/notification/package-info.java @@ -0,0 +1,24 @@ +/* + * 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.server.usertoken.notification; + +import javax.annotation.ParametersAreNonnullByDefault; + diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/duplication/ws/ShowResponseBuilder.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/duplication/ws/ShowResponseBuilder.java index 07f293a9f1d..46f698e65fb 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/duplication/ws/ShowResponseBuilder.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/duplication/ws/ShowResponseBuilder.java @@ -92,7 +92,6 @@ public class ShowResponseBuilder { private void writeFileRefs(DbSession session, Map refByComponentKey, ShowResponse.Builder response, @Nullable String branch, @Nullable String pullRequest) { Map projectsByUuid = new HashMap<>(); - Map parentModulesByUuid = new HashMap<>(); for (Map.Entry entry : refByComponentKey.entrySet()) { Reference ref = entry.getValue(); -- 2.39.5