From dbe1d23be5420a5efa4d3977fee974c452bbfd29 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 14 Aug 2018 14:22:34 -0400 Subject: Fix checkstyle issues Spacing, missing javadoc Issue-ID: POLICY-883 Change-Id: Ice65c6c1baf0bb7c6273411f078bacfe3496b89b Signed-off-by: Pamela Dragosh --- .../policy/controlloop/compiler/ControlLoopCompiler.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'controlloop/common/policy-yaml') diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java index b088af78a..27c9bf8cd 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java @@ -52,6 +52,9 @@ public class ControlLoopCompiler implements Serializable { private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(ControlLoopCompiler.class.getName()); + /** + * Compiles the policy from an object. + */ public static ControlLoopPolicy compile(ControlLoopPolicy policy, ControlLoopCompilerCallback callback) throws CompilerException { // @@ -66,6 +69,15 @@ public class ControlLoopCompiler implements Serializable { return policy; } + /** + * Compiles the policy from an input stream. + * + * @param yamlSpecification the yaml input stream + * @param callback method to callback during compilation + * @return + * + * @throws CompilerException throws any compile exception found + */ public static ControlLoopPolicy compile(InputStream yamlSpecification, ControlLoopCompilerCallback callback) throws CompilerException { Yaml yaml = new Yaml(new Constructor(ControlLoopPolicy.class)); @@ -84,7 +96,7 @@ public class ControlLoopCompiler implements Serializable { if (controlLoop == null && callback != null) { callback.onError("controlLoop cannot be null"); } - if (controlLoop!=null){ + if (controlLoop != null) { if ((controlLoop.getControlLoopName() == null || controlLoop.getControlLoopName().length() < 1) && callback != null) { callback.onError("Missing controlLoopName"); -- cgit 1.2.3-korg