Skip to content

Commit

Permalink
Service code cleanup (#925)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottf authored Jun 14, 2023
1 parent 4f3ca27 commit bd1e460
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/main/java/io/nats/service/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> infoSubjects = new ArrayList<>();
List<Endpoint> infoEndpoints = new ArrayList<>();
serviceContexts = new HashMap<>();
for (ServiceEndpoint se : b.serviceEndpoints.values()) {
Expand All @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/io/nats/service/ServiceTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -992,9 +992,9 @@ public void testServiceResponsesConstruction() {
iae = assertThrows(IllegalArgumentException.class, () -> new TestServiceResponses(json4.getBytes()));
assertTrue(iae.getMessage().contains("Version cannot be null"));

Map<String, String> meta = new HashMap<>();
meta.put("foo", "bar");
Endpoint end1 = new Endpoint("endfoo", meta);
Map<String, String> 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());
Expand Down Expand Up @@ -1161,4 +1161,4 @@ public void testInboxSupplier() throws Exception {
assertTrue(supplier.wasCalled);
});
}
}
}

0 comments on commit bd1e460

Please sign in to comment.