From a9feea32cc3b167d13a5400f65bea192bc87beb9 Mon Sep 17 00:00:00 2001 From: Ryan Izard <rizard@g.clemson.edu> Date: Thu, 12 Mar 2015 10:36:36 -0400 Subject: [PATCH] Fixed a bug that caused flows without instructions/actions (i.e. drop flows) to throw an exception during serialization. This addresses an issue common to the SFP and the switch flow stats reply serialization (since they both rely on the same core.web serializer). --- .../core/web/serializers/OFInstructionListSerializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/floodlightcontroller/core/web/serializers/OFInstructionListSerializer.java b/src/main/java/net/floodlightcontroller/core/web/serializers/OFInstructionListSerializer.java index a59d38fd3..0388461c0 100644 --- a/src/main/java/net/floodlightcontroller/core/web/serializers/OFInstructionListSerializer.java +++ b/src/main/java/net/floodlightcontroller/core/web/serializers/OFInstructionListSerializer.java @@ -74,7 +74,7 @@ public class OFInstructionListSerializer extends JsonSerializer<List<OFInstructi } // end switch on instruction jGen.writeEndObject(); // end specific instruction } // end for instructions - jGen.writeEndObject(); } // end process instructions (OF1.1+ only) + jGen.writeEndObject(); // end object (either has instructions or a "none":"drop" key:value as specified above) } // end not-empty instructions (else) } -- GitLab