X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Finternal%2FUtils.java;h=8d2ca8704a6b46aee8a6f05771d4392445777241;hb=dfa4383b0b5c9c6de340526a62aef731922fa29f;hp=f1ce03af281ffbfe51846173f6ebbc744e4d37d1;hpb=650881665d632280824523b05a2ab699e6932bfb;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Utils.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Utils.java index f1ce03af28..8d2ca8704a 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Utils.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Utils.java @@ -21,8 +21,12 @@ import org.openflow.protocol.OFError.OFHelloFailedCode; import org.openflow.protocol.OFError.OFPortModFailedCode; import org.openflow.protocol.OFError.OFQueueOpFailedCode; -public abstract class Utils { - public static String getOFErrorString(OFError error) { +public final class Utils { + + private Utils() { //prevent instantiation + throw new AssertionError(); + } + static String getOFErrorString(OFError error) { // Handle VENDOR extension errors here if (error.getErrorType() == V6Error.NICIRA_VENDOR_ERRORTYPE) { V6Error er = new V6Error(error); @@ -33,7 +37,7 @@ public abstract class Utils { er.readFrom(bb); return er.toString(); } - + // Handle OF1.0 errors here OFErrorType et = OFErrorType.values()[0xffff & error.getErrorType()]; String errorStr = "Error : " + et.toString();