diff options
Diffstat (limited to 'adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java')
-rw-r--r-- | adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java | 97 |
1 files changed, 48 insertions, 49 deletions
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java index d920dbea36..f56f5af05b 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java @@ -27,61 +27,60 @@ import org.slf4j.LoggerFactory; public class ValidateUtil { - /** - * Log server. - */ - private static final Logger LOGGER = LoggerFactory.getLogger(ValidateUtil.class); + /** + * Log server. + */ + private static final Logger LOGGER = LoggerFactory.getLogger(ValidateUtil.class); - /** - * Constructor<br/> - * <p> - * </p> - * - * @since ONAP Amsterdam Release 2017-9-6 - */ - private ValidateUtil() { + /** + * Constructor<br/> + * <p> + * </p> + * + * @since ONAP Amsterdam Release 2017-9-6 + */ + private ValidateUtil() { - } - - /** - * Assert String parameter.<br/> - * - * @param paramValue parameter data - * @param paramName parameter name - * @since ONAP Amsterdam Release 2017-9-6 - */ - public static void assertStringNotNull(String paramValue, String paramName) - throws ApplicationException { - if (null != paramValue && !paramValue.isEmpty()) { - return; } - LOGGER.error(paramName + ": Parameter is null or empty."); - throw new ApplicationException(HttpCode.BAD_REQUEST, paramName + ": Invalid parameter."); - } + /** + * Assert String parameter.<br/> + * + * @param paramValue parameter data + * @param paramName parameter name + * @since ONAP Amsterdam Release 2017-9-6 + */ + public static void assertStringNotNull(String paramValue, String paramName) throws ApplicationException { + if (null != paramValue && !paramValue.isEmpty()) { + return; + } - /** - * Assert object is null.<br/> - * - * @param object data object - * @since ONAP Amsterdam Release 2017-9-6 - */ - public static void assertObjectNotNull(Object object) throws ApplicationException { - if (null == object) { - LOGGER.error("Object is null."); - throw new ApplicationException(HttpCode.BAD_REQUEST, "Object is null."); + LOGGER.error(paramName + ": Parameter is null or empty."); + throw new ApplicationException(HttpCode.BAD_REQUEST, paramName + ": Invalid parameter."); } - } + /** + * Assert object is null.<br/> + * + * @param object data object + * @since ONAP Amsterdam Release 2017-9-6 + */ + public static void assertObjectNotNull(Object object) throws ApplicationException { + if (null == object) { + LOGGER.error("Object is null."); + throw new ApplicationException(HttpCode.BAD_REQUEST, "Object is null."); + } + + } - /** - * <br> - * - * @param str - * @return - * @since ONAP Amsterdam Release - */ - public static boolean isStrEmpty(String str) { - return null == str || str.isEmpty(); - } + /** + * <br> + * + * @param str + * @return + * @since ONAP Amsterdam Release + */ + public static boolean isStrEmpty(String str) { + return null == str || str.isEmpty(); + } } |