Compiler warnings
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package org.springframework.cloud.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -77,7 +76,7 @@ public class CommonsClientAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
public FeaturesEndpoint featuresEndpoint() {
|
||||
return new FeaturesEndpoint(hasFeatures);
|
||||
return new FeaturesEndpoint(this.hasFeatures);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.springframework.cloud.client.actuator;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Singular;
|
||||
import lombok.Value;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Singular;
|
||||
import lombok.Value;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@@ -20,18 +20,22 @@ public class HasFeatures {
|
||||
private final List<NamedFeature> namedFeatures;
|
||||
|
||||
public static HasFeatures abstractFeatures(Class... abstractFeatures) {
|
||||
return new HasFeatures(Arrays.asList(abstractFeatures), Collections.<NamedFeature>emptyList());
|
||||
return new HasFeatures(Arrays.asList(abstractFeatures),
|
||||
Collections.<NamedFeature> emptyList());
|
||||
}
|
||||
|
||||
public static HasFeatures namedFeatures(NamedFeature... namedFeatures) {
|
||||
return new HasFeatures(Collections.<Class>emptyList(), Arrays.asList(namedFeatures));
|
||||
return new HasFeatures(Collections.<Class> emptyList(),
|
||||
Arrays.asList(namedFeatures));
|
||||
}
|
||||
|
||||
public static HasFeatures namedFeature(String name, Class<?> type) {
|
||||
return namedFeatures(new NamedFeature(name, type));
|
||||
}
|
||||
|
||||
public static HasFeatures namedFeatures(String name1, Class<?> type1, String name2, Class<?> type2) {
|
||||
return namedFeatures(new NamedFeature(name1, type1), new NamedFeature(name2, type2));
|
||||
public static HasFeatures namedFeatures(String name1, Class<?> type1, String name2,
|
||||
Class<?> type2) {
|
||||
return namedFeatures(new NamedFeature(name1, type1),
|
||||
new NamedFeature(name2, type2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ package org.springframework.cloud.client.discovery.health;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
|
||||
import org.springframework.boot.actuate.health.Health;
|
||||
import org.springframework.boot.actuate.health.Status;
|
||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
||||
@@ -28,12 +26,14 @@ import org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@CommonsLog
|
||||
public class DiscoveryClientHealthIndicator implements DiscoveryHealthIndicator, Ordered,
|
||||
ApplicationListener<InstanceRegisteredEvent> {
|
||||
ApplicationListener<InstanceRegisteredEvent<?>> {
|
||||
|
||||
private AtomicBoolean discoveryInitialized = new AtomicBoolean(false);
|
||||
|
||||
@@ -46,7 +46,7 @@ public class DiscoveryClientHealthIndicator implements DiscoveryHealthIndicator,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(InstanceRegisteredEvent event) {
|
||||
public void onApplicationEvent(InstanceRegisteredEvent<?> event) {
|
||||
if (this.discoveryInitialized.compareAndSet(false, true)) {
|
||||
log.debug("Discovery Client has been initialized");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user