From e03e109874cb8df2fb6d24e4257cde2d6f3ca593 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 18 Jul 2016 11:27:55 -0700 Subject: [PATCH] Polish --- .../boot/actuate/health/RedisHealthIndicator.java | 5 +++-- .../autoconfigure/transaction/jta/JtaAutoConfiguration.java | 1 + .../hornetq/HornetQEmbeddedConfigurationFactoryTests.java | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/RedisHealthIndicator.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/RedisHealthIndicator.java index 2adade42b2..96e4a6838c 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/RedisHealthIndicator.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/RedisHealthIndicator.java @@ -36,7 +36,9 @@ import org.springframework.util.Assert; public class RedisHealthIndicator extends AbstractHealthIndicator { private static final String VERSION = "version"; + private static final String REDIS_VERSION = "redis_version"; + private final RedisConnectionFactory redisConnectionFactory; public RedisHealthIndicator(RedisConnectionFactory connectionFactory) { @@ -52,8 +54,7 @@ public class RedisHealthIndicator extends AbstractHealthIndicator { if (connection instanceof RedisClusterConnection) { ClusterInfo clusterInfo = ((RedisClusterConnection) connection) .clusterGetClusterInfo(); - builder.up() - .withDetail("cluster_size", clusterInfo.getClusterSize()) + builder.up().withDetail("cluster_size", clusterInfo.getClusterSize()) .withDetail("slots_up", clusterInfo.getSlotsOk()) .withDetail("slots_fail", clusterInfo.getSlotsFail()); } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfiguration.java index 5a75fb70c6..42d7edc195 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfiguration.java @@ -34,6 +34,7 @@ import org.springframework.context.annotation.Import; * @author Phillip Webb * @since 1.2.0 */ +@SuppressWarnings("deprecation") @ConditionalOnClass(javax.transaction.Transaction.class) @ConditionalOnProperty(prefix = "spring.jta", value = "enabled", matchIfMissing = true) @AutoConfigureBefore({ XADataSourceAutoConfiguration.class, diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java index 8268b7b125..5175f7dcf1 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java @@ -29,7 +29,6 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Phillip Webb */ @Deprecated -@SuppressWarnings("deprecation") public class HornetQEmbeddedConfigurationFactoryTests { @Test