Upgrade sonar to new 6.2 installation (#456)

* Upgrade to new sonar instance. Fix new identified issues.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-03-14 10:06:56 +01:00
committed by GitHub
parent 809fe4a8b6
commit 67d17fe661
66 changed files with 558 additions and 713 deletions

View File

@@ -8,8 +8,6 @@
*/
package org.eclipse.hawkbit.simulator;
import static java.util.concurrent.Executors.newScheduledThreadPool;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
@@ -46,7 +44,7 @@ public class DeviceSimulator {
*/
@Bean
public ScheduledExecutorService threadPool() {
return newScheduledThreadPool(8);
return Executors.newScheduledThreadPool(8);
}
/**

View File

@@ -8,8 +8,6 @@
*/
package org.eclipse.hawkbit.simulator;
import static org.eclipse.hawkbit.simulator.amqp.AmqpProperties.CONFIGURATION_PREFIX;
import java.net.MalformedURLException;
import java.net.URL;
@@ -84,7 +82,7 @@ public class SimulationController {
if (protocol == Protocol.DMF_AMQP && isDmfDisabled()) {
return ResponseEntity.badRequest()
.body("The AMQP interface has been disabled, to use DMF protocol you need to enable the AMQP interface via '"
+ CONFIGURATION_PREFIX + ".enabled=true'");
+ AmqpProperties.CONFIGURATION_PREFIX + ".enabled=true'");
}
for (int i = 0; i < amount; i++) {

View File

@@ -8,8 +8,6 @@
*/
package org.eclipse.hawkbit.simulator.amqp;
import static org.eclipse.hawkbit.simulator.amqp.AmqpProperties.CONFIGURATION_PREFIX;
import java.time.Duration;
import java.util.Map;
@@ -43,7 +41,7 @@ import com.google.common.collect.Maps;
*/
@Configuration
@EnableConfigurationProperties(AmqpProperties.class)
@ConditionalOnProperty(prefix = CONFIGURATION_PREFIX, name = "enabled")
@ConditionalOnProperty(prefix = AmqpProperties.CONFIGURATION_PREFIX, name = "enabled")
public class AmqpConfiguration {
private static final Logger LOGGER = LoggerFactory.getLogger(AmqpConfiguration.class);

View File

@@ -14,9 +14,6 @@ import java.time.LocalDateTime;
/**
* Object for holding attributes for a simulated update for the device
* simulator.
*
*
*
*/
public class SimulatedUpdate implements Serializable {
@@ -27,7 +24,7 @@ public class SimulatedUpdate implements Serializable {
protected final Long actionId;
protected LocalDateTime startCacheTime;
protected transient LocalDateTime startCacheTime;
/**
* Constructor of the class.

View File

@@ -8,8 +8,6 @@
*/
package org.eclipse.hawkbit.simulator.amqp;
import static org.eclipse.hawkbit.simulator.amqp.AmqpProperties.CONFIGURATION_PREFIX;
import java.util.Map;
import org.eclipse.hawkbit.dmf.amqp.api.EventTopic;
@@ -35,7 +33,7 @@ import com.google.common.collect.Lists;
*
*/
@Component
@ConditionalOnProperty(prefix = CONFIGURATION_PREFIX, name = "enabled")
@ConditionalOnProperty(prefix = AmqpProperties.CONFIGURATION_PREFIX, name = "enabled")
public class SpReceiverService extends ReceiverService {
private static final Logger LOGGER = LoggerFactory.getLogger(ReceiverService.class);