From: Tony Tkacik Date: Tue, 25 Feb 2014 11:10:25 +0000 (+0000) Subject: Merge "Fix some sonar bugs in config-api and config-manager." X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~393 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=37cf6538c44f41123b2261dd158f91078b07fb4f;hp=-c Merge "Fix some sonar bugs in config-api and config-manager." --- 37cf6538c44f41123b2261dd158f91078b07fb4f diff --combined opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ValidationException.java index 68cd58d3a2,a93d97c7ee..82b73d419e --- a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ValidationException.java +++ b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ValidationException.java @@@ -16,11 -16,9 +16,11 @@@ import java.util.Map.Entry /** * This exception is not intended to be used while implementing modules, - * itaggregates validation exceptions and sends them back to the user. + * it aggregates validation exceptions and sends them back to the user. + * Use {@link org.opendaylight.controller.config.api.JmxAttributeValidationException} for + * validating modules instead. */ -public class ValidationException extends RuntimeException { +public class ValidationException extends Exception { private static final long serialVersionUID = -6072893219820274247L; private final Map> failedValidations; @@@ -120,23 -118,30 +120,30 @@@ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } ExceptionMessageWithStackTrace other = (ExceptionMessageWithStackTrace) obj; if (message == null) { - if (other.message != null) + if (other.message != null) { return false; - } else if (!message.equals(other.message)) + } + } else if (!message.equals(other.message)) { return false; + } if (stackTrace == null) { - if (other.stackTrace != null) + if (other.stackTrace != null) { return false; - } else if (!stackTrace.equals(other.stackTrace)) + } + } else if (!stackTrace.equals(other.stackTrace)) { return false; + } return true; }