]> source.dussan.org Git - sonarqube.git/commitdiff
NO-JIRA Fix SQ Issues
authorantoine.vinot <antoine.vinot@sonarsource.com>
Mon, 21 Oct 2024 11:50:34 +0000 (13:50 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 22 Oct 2024 20:03:09 +0000 (20:03 +0000)
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/dependency/package-info.java [new file with mode: 0644]
server/sonar-server-common/src/test/java/org/sonar/server/log/ServerProcessLoggingTest.java
server/sonar-webserver-api/src/test/java/org/sonar/server/http/JavaxHttpResponseTest.java
server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventListenersImplTest.java
server/sonar-webserver/src/test/java/org/sonar/server/platform/web/MasterServletFilterTest.java

diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/dependency/package-info.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/dependency/package-info.java
new file mode 100644 (file)
index 0000000..c590954
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2024 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.dependency;
+
+import javax.annotation.ParametersAreNonnullByDefault;
index b0118faee736f066b4cb5aecc13b40ae58d32176..663ef65f5dcadfe78f46a784adf34b4363015a41 100644 (file)
@@ -50,10 +50,14 @@ public class ServerProcessLoggingTest {
   private ServerProcessLogging getServerProcessLoggingFakeImpl(ProcessId processId, String threadIdFieldPattern) {
     return new ServerProcessLogging(processId, threadIdFieldPattern) {
       @Override
-      protected void extendLogLevelConfiguration(LogLevelConfig.Builder logLevelConfigBuilder) {}
+      protected void extendLogLevelConfiguration(LogLevelConfig.Builder logLevelConfigBuilder) {
+        //Not needed for this test
+      }
 
       @Override
-      protected void extendConfigure(Props props) {}
+      protected void extendConfigure(Props props) {
+        //Not needed for this test
+      }
     };
   }
 }
index 999ec74c99f6215b93bca1c2540fb556b1803c80..a936cfcddd2a378811124b0800bddd3606a26ce2 100644 (file)
@@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletResponse;
 import org.junit.Test;
 import org.sonar.api.server.http.Cookie;
 
-import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -50,7 +50,7 @@ public class JavaxHttpResponseTest {
 
     assertThat(underTest.getDelegate()).isSameAs(responseMock);
     assertThat(underTest.getHeader("h1")).isEqualTo("hvalue1");
-    assertThat(underTest.getHeaders("h1")).asList().containsExactly("hvalue1");
+    assertThat(underTest.getHeaders("h1")).containsExactly("hvalue1");
     assertThat(underTest.getStatus()).isEqualTo(200);
     assertThat(underTest.getWriter()).isEqualTo(writer);
     assertThat(underTest.getOutputStream()).isEqualTo(outputStream);
index d447dc221657e8e5d26cdad69a34aea259706cf5..4c203432ef80b411e597c77437e44a5b2ef84ff3 100644 (file)
@@ -167,9 +167,9 @@ public class QGChangeEventListenersImplTest {
 
   @Test
   public void broadcastOnIssueChange_passes_immutable_set_of_ChangedIssues() {
-    QGChangeEventListenersImpl underTest = new QGChangeEventListenersImpl(Set.of(listener1));
+    var qgChangeEventListeners = new QGChangeEventListenersImpl(Set.of(listener1));
 
-    underTest.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
+    qgChangeEventListeners.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
 
     ArgumentCaptor<Set<ChangedIssue>> changedIssuesCaptor = newSetCaptor();
     inOrder.verify(listener1).onIssueChanges(same(component1QGChangeEvent), changedIssuesCaptor.capture());
@@ -178,9 +178,9 @@ public class QGChangeEventListenersImplTest {
 
   @Test
   public void broadcastOnIssueChange_has_no_effect_when_no_listener() {
-    QGChangeEventListenersImpl underTest = new QGChangeEventListenersImpl(Set.of());
+    var qgChangeEventListeners = new QGChangeEventListenersImpl(Set.of());
 
-    underTest.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
+    qgChangeEventListeners.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
 
     verifyNoInteractions(listener1, listener2, listener3);
   }
index f35be421384be8dcd5ae07666bc44ba5831ef1f6..f8d63216c39f94245acaf2b60a715a6e77cf9e5f 100644 (file)
@@ -214,8 +214,8 @@ public class MasterServletFilterTest {
     }
 
     @Override
-    public void doFilter(HttpRequest request, HttpResponse response, org.sonar.api.web.FilterChain chain) throws IOException {
-
+    public void doFilter(HttpRequest request, HttpResponse response, org.sonar.api.web.FilterChain chain) {
+      //Not needed for this test
     }
 
     @Override