From 8aaa500c1046bb021369af0ac42f3d093431597c Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 5 May 2015 16:57:26 +0200 Subject: [PATCH] Sort reported nodes The order of the nodes is asserted by the unit tests -- make sure this is predictable across JDK versions. Change-Id: I804024fe66530aa380dbd48907268fc12a4d3085 Signed-off-by: Robert Varga --- .../java/org/opendaylight/ovsdb/northbound/NodeResource.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/northbound/src/main/java/org/opendaylight/ovsdb/northbound/NodeResource.java b/northbound/src/main/java/org/opendaylight/ovsdb/northbound/NodeResource.java index a4fc913c0f..034ddff6be 100644 --- a/northbound/src/main/java/org/opendaylight/ovsdb/northbound/NodeResource.java +++ b/northbound/src/main/java/org/opendaylight/ovsdb/northbound/NodeResource.java @@ -2,6 +2,7 @@ package org.opendaylight.ovsdb.northbound; import com.fasterxml.jackson.databind.SerializationFeature; import java.io.InputStream; +import java.util.Collections; import java.util.List; import javax.ws.rs.Consumes; @@ -99,6 +100,7 @@ public class NodeResource { for (Node node : nodes) { nodeIds.add(node.getId().getValue()); } + Collections.sort(nodeIds); String response = objectMapper.writeValueAsString(nodeIds); return Response.status(Response.Status.OK) -- 2.36.6