From 6149156fffb9f12c655ab401a20205d33ed7e3c2 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 4 Oct 2017 15:51:20 -0400 Subject: [PATCH] Fix type/name ordering in FeaturesEndpoint fixes gh-258 --- .../client/actuator/FeaturesEndpoint.java | 38 +++++++++++++++++-- .../actuator/FeaturesEndpointTests.java | 19 ++++++---- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/actuator/FeaturesEndpoint.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/actuator/FeaturesEndpoint.java index 319e27c6..19f6fb9c 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/actuator/FeaturesEndpoint.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/actuator/FeaturesEndpoint.java @@ -90,7 +90,7 @@ public class FeaturesEndpoint extends AbstractEndpoint enabled = new ArrayList<>(); final List disabled = new ArrayList<>(); @@ -104,13 +104,13 @@ public class FeaturesEndpoint extends AbstractEndpoint type) { + return new FeaturesEndpoint.Feature(name, type.getCanonicalName(), null, null); } @Configuration @@ -60,7 +63,7 @@ public class FeaturesEndpointTests { HasFeatures localFeatures() { HasFeatures features = HasFeatures.namedFeatures( new NamedFeature("foo", Foo.class), - new NamedFeature("Bar Feature", Bar.class)); + new NamedFeature("Baz Feature", Baz.class)); features.getAbstractFeatures().add(Bar.class); return features; }