Sonar Fixes (6) (#2214)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-01-21 16:13:43 +02:00
committed by GitHub
parent e8406afeba
commit bbb5f40207
23 changed files with 95 additions and 109 deletions

View File

@@ -9,35 +9,10 @@
*/
package org.eclipse.hawkbit.autoconfigure.repository.event;
import java.util.concurrent.Executor;
import io.protostuff.ProtostuffIOUtil;
import io.protostuff.Schema;
import org.eclipse.hawkbit.event.BusProtoStuffMessageConverter;
import org.eclipse.hawkbit.event.EventPublisherConfiguration;
import org.eclipse.hawkbit.repository.event.ApplicationEventFilter;
import org.eclipse.hawkbit.repository.event.remote.RemoteTenantAwareEvent;
import org.eclipse.hawkbit.repository.model.helper.EventPublisherHolder;
import org.eclipse.hawkbit.security.SystemSecurityContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.bus.BusProperties;
import org.springframework.cloud.bus.ConditionalOnBusEnabled;
import org.springframework.cloud.bus.ServiceMatcher;
import org.springframework.cloud.bus.jackson.RemoteApplicationEventScan;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.event.ApplicationEventMulticaster;
import org.springframework.context.event.SimpleApplicationEventMulticaster;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.core.ResolvableType;
import org.springframework.messaging.converter.MessageConverter;
/**
* Autoconfiguration for the event bus.

View File

@@ -86,7 +86,7 @@ public class ExecutorAutoConfiguration {
private static ThreadFactory threadFactory(final String format) {
final AtomicLong count = new AtomicLong(0);
return (runnable) -> {
return runnable -> {
final Thread thread = Executors.defaultThreadFactory().newThread(runnable);
thread.setName(String.format(Locale.ROOT, format, count.getAndIncrement()));
return thread;