diff --git a/src/main/java/io/nats/service/Service.java b/src/main/java/io/nats/service/Service.java index 094188f0e..7ccf69a9d 100644 --- a/src/main/java/io/nats/service/Service.java +++ b/src/main/java/io/nats/service/Service.java @@ -63,7 +63,6 @@ public class Service { // ? do we need an internal dispatcher for any user endpoints // ! also while we are here, we need to collect the endpoints for the SchemaResponse Dispatcher dTemp = null; - List infoSubjects = new ArrayList<>(); List infoEndpoints = new ArrayList<>(); serviceContexts = new HashMap<>(); for (ServiceEndpoint se : b.serviceEndpoints.values()) { @@ -76,7 +75,6 @@ public class Service { else { serviceContexts.put(se.getName(), new EndpointContext(conn, null, true, se)); } - infoSubjects.add(se.getSubject()); infoEndpoints.add(se.getEndpoint()); } if (dTemp != null) { diff --git a/src/test/java/io/nats/service/ServiceTests.java b/src/test/java/io/nats/service/ServiceTests.java index 0e3fa1eaa..102d9ec29 100644 --- a/src/test/java/io/nats/service/ServiceTests.java +++ b/src/test/java/io/nats/service/ServiceTests.java @@ -992,9 +992,9 @@ public void testServiceResponsesConstruction() { iae = assertThrows(IllegalArgumentException.class, () -> new TestServiceResponses(json4.getBytes())); assertTrue(iae.getMessage().contains("Version cannot be null")); - Map meta = new HashMap<>(); - meta.put("foo", "bar"); - Endpoint end1 = new Endpoint("endfoo", meta); + Map endMeta = new HashMap<>(); + endMeta.put("foo", "bar"); + Endpoint end1 = new Endpoint("endfoo", endMeta); InfoResponse ir1 = new InfoResponse("id", "name", "0.0.0", metadata, "desc", Collections.singletonList(end1)); InfoResponse ir2 = new InfoResponse(ir1.toJson().getBytes()); System.out.println(ir1.toJson()); @@ -1161,4 +1161,4 @@ public void testInboxSupplier() throws Exception { assertTrue(supplier.wasCalled); }); } -} \ No newline at end of file +}