From 834cf450bb77a36d49719480a41ec75d741e0009 Mon Sep 17 00:00:00 2001 From: "Banse, Christian" <christian.banse@aisec.fraunhofer.de> Date: Tue, 2 Jun 2015 11:10:33 +0200 Subject: [PATCH] minor cleanup for handle-outgoing-messages feature --- .gitignore | 1 - src/main/java/net/floodlightcontroller/core/OFSwitch.java | 4 ++-- .../floodlightcontroller/core/internal/IOFSwitchManager.java | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 3f3378df5..914574093 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,3 @@ findbugs-results /thrift *.idea/* *.iml -/target/ diff --git a/src/main/java/net/floodlightcontroller/core/OFSwitch.java b/src/main/java/net/floodlightcontroller/core/OFSwitch.java index c6421ce9d..eeb33525b 100644 --- a/src/main/java/net/floodlightcontroller/core/OFSwitch.java +++ b/src/main/java/net/floodlightcontroller/core/OFSwitch.java @@ -715,7 +715,7 @@ public class OFSwitch implements IOFSwitchBackend { log.trace("Channel: {}, Connected: {}", connections.get(OFAuxId.MAIN).getRemoteInetAddress(), connections.get(OFAuxId.MAIN).isConnected()); if (isActive()) { connections.get(OFAuxId.MAIN).write(m); - switchManager.handleOutgoingMessage(this, m); + switchManager.handleOutgoingMessage(this, m); } else { log.warn("Attempted to write to switch {} that is SLAVE.", this.getId().toString()); } @@ -747,7 +747,7 @@ public class OFSwitch implements IOFSwitchBackend { public void write(OFMessage m, LogicalOFMessageCategory category) { if (isActive()) { this.getConnection(category).write(m); - switchManager.handleOutgoingMessage(this, m); + switchManager.handleOutgoingMessage(this, m); } else { log.warn("Attempted to write to switch {} that is SLAVE.", this.getId().toString()); } diff --git a/src/main/java/net/floodlightcontroller/core/internal/IOFSwitchManager.java b/src/main/java/net/floodlightcontroller/core/internal/IOFSwitchManager.java index 03df219d9..e3b0d8ea9 100644 --- a/src/main/java/net/floodlightcontroller/core/internal/IOFSwitchManager.java +++ b/src/main/java/net/floodlightcontroller/core/internal/IOFSwitchManager.java @@ -61,9 +61,8 @@ public interface IOFSwitchManager { * Process written messages through the message listeners for the controller * @param sw The switch being written to * @param m the message - * @throws NullPointerException if switch or msg is null */ - public void handleOutgoingMessage(IOFSwitch sw, OFMessage m); + public void handleOutgoingMessage(IOFSwitch sw, OFMessage m); /** * Gets an unmodifiable collection of OFSwitchHandshakeHandlers -- GitLab