Sonar Fixes (5) (#2211)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-01-21 11:20:50 +02:00
committed by GitHub
parent 33a6250646
commit 567e8b38f1
59 changed files with 240 additions and 276 deletions

View File

@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.repository.builder;
import java.util.Optional;
import org.eclipse.hawkbit.repository.ValidString;
import org.springframework.util.StringUtils;
/**
* Create and update builder DTO.

View File

@@ -30,7 +30,7 @@ import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.converter.MessageConversionException;
@ExtendWith(MockitoExtension.class)
public class BusProtoStuffMessageConverterTest {
class BusProtoStuffMessageConverterTest {
private final BusProtoStuffMessageConverter underTest = new BusProtoStuffMessageConverter();
@@ -41,13 +41,13 @@ public class BusProtoStuffMessageConverterTest {
private Message<Object> messageMock;
@BeforeEach
public void before() {
void before() {
when(targetMock.getId()).thenReturn(1L);
}
@Test
@Description("Verifies that the TargetCreatedEvent can be successfully serialized and deserialized")
public void successfullySerializeAndDeserializeEvent() {
void successfullySerializeAndDeserializeEvent() {
final TargetCreatedEvent targetCreatedEvent = new TargetCreatedEvent(targetMock, "1");
// serialize
final Object serializedEvent = underTest.convertToInternal(targetCreatedEvent,
@@ -63,7 +63,7 @@ public class BusProtoStuffMessageConverterTest {
@Test
@Description("Verifies that a MessageConversationException is thrown on missing event-type information encoding")
public void missingEventTypeMappingThrowsMessageConversationException() {
void missingEventTypeMappingThrowsMessageConversationException() {
final DummyRemoteEntityEvent dummyEvent = new DummyRemoteEntityEvent(targetMock, "applicationId");
final MessageHeaders messageHeaders = new MessageHeaders(new HashMap<>());