diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-06-11 10:06:54 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-06-11 10:07:06 +0100 |
commit | 56112164b8a3b48989eb3fdae2baa2d906e3ced0 (patch) | |
tree | cdde79bdb9758d8a3719e03c515d271615ffc017 /model/utilities/src/main/java/org | |
parent | 9289ac0afefe62f6c8e9cebddb611a8571bf5642 (diff) |
Remove warnings from code
Remove "final" from variables and add setters in test
case to get rid of "dead code" warnings
Change implementation in typeutils grammar generation
to remove depricated warning
Change-Id: I24c4bb3f06f4c6fa227d8d191dc2fb6a6cf0b6fb
Issue-ID: POLICY-716
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'model/utilities/src/main/java/org')
-rw-r--r-- | model/utilities/src/main/java/org/onap/policy/apex/model/utilities/typeutils/TypeBuilder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/typeutils/TypeBuilder.java b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/typeutils/TypeBuilder.java index a3f22a446..0e3851519 100644 --- a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/typeutils/TypeBuilder.java +++ b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/typeutils/TypeBuilder.java @@ -23,14 +23,14 @@ package org.onap.policy.apex.model.utilities.typeutils; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; -import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.BailErrorStrategy; import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.TokenStream; /** - * This class . + * This class builds a type from a grammar using ANTLR. */ public final class TypeBuilder { /** @@ -51,7 +51,7 @@ public final class TypeBuilder { } try { - final CharStream stream = new ANTLRInputStream(type); + final CharStream stream = CharStreams.fromString(type); final TokenStream tokenStream = new CommonTokenStream(new ParametrizedTypeLexer(stream)); final ParametrizedTypeParser parser = new ParametrizedTypeParser(tokenStream); |