diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-07-30 10:22:27 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-07-31 16:06:47 +0100 |
commit | 73ba8039930ba56f6a64a7acc4126dc50b77070d (patch) | |
tree | bb46330718aa99e9753a69715c0ea54e990aca4d /common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterException.java | |
parent | c36939ee0e648f4ac28b9cdc538991ced0c603bd (diff) |
Improve validation, add hierarchical validation
Parameter validaiton updated to generically support nested groups of
parameters, and nested maps of parameters.
Unit test showing JSON parameter input added.
Unit test showing YAML parameter inout added.
Test parameter group classes moved into subdirectory
This allows parameters to be unmarshaled seamlessly from JSON and YAML
files.
Change-Id: I768e11f31ee7f62299c4d5d95ab68a005d1aff16
Issue-ID: POLICY-922
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterException.java')
-rw-r--r-- | common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterException.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterException.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterException.java index 129d5390..3a6e17e8 100644 --- a/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterException.java +++ b/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterException.java @@ -55,21 +55,21 @@ public class ParameterException extends Exception { * Instantiates a new parameter exception. * * @param message the message on the exception - * @param e the exception that caused this parameter exception + * @param exception the exception that caused this parameter exception */ - public ParameterException(final String message, final Exception e) { - this(message, e, null); + public ParameterException(final String message, final Exception exception) { + this(message, exception, null); } /** * Instantiates a new parameter exception. * * @param message the message on the exception - * @param e the exception that caused this parameter exception + * @param exception the exception that caused this parameter exception * @param object the object that the exception was thrown on */ - public ParameterException(final String message, final Exception e, final Object object) { - super(message, e); + public ParameterException(final String message, final Exception exception, final Object object) { + super(message, exception); this.object = object; } @@ -83,7 +83,7 @@ public class ParameterException extends Exception { } /** - * Build a cascaded message from an exception and all its nested exceptions + * Build a cascaded message from an exception and all its nested exceptions. * * @param throwable the top level exception * @return cascaded message string @@ -101,7 +101,6 @@ public class ParameterException extends Exception { } /** - * * Get the object on which the exception was thrown. * * @return The object on which the exception was thrown |