aboutsummaryrefslogtreecommitdiffstats
path: root/model/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'model/utilities')
-rw-r--r--model/utilities/pom.xml2
-rw-r--r--model/utilities/src/main/java/org/onap/policy/apex/model/utilities/typeutils/TypeBuilder.java6
-rw-r--r--model/utilities/src/test/java/org/onap/policy/apex/model/utilities/typeutils/ParserTest.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/model/utilities/pom.xml b/model/utilities/pom.xml
index 7247423d0..722ee6512 100644
--- a/model/utilities/pom.xml
+++ b/model/utilities/pom.xml
@@ -45,7 +45,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
- <version>4.6</version>
+ <version>4.7.1</version>
<executions>
<execution>
<id>antlr-sources</id>
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);
diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/typeutils/ParserTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/typeutils/ParserTest.java
index bf4226102..a979afddc 100644
--- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/typeutils/ParserTest.java
+++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/typeutils/ParserTest.java
@@ -25,9 +25,9 @@ import static org.junit.Assert.fail;
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;
import org.junit.Test;
@@ -38,7 +38,7 @@ import org.junit.Test;
public class ParserTest {
@Test
public void testParser() {
- final CharStream stream = new ANTLRInputStream(
+ final CharStream stream = CharStreams.fromString(
"java.util.Map<java.util.List<java.lang.Integer>,java.util.Set<java.lang.String>>");
final TokenStream tokenStream = new CommonTokenStream(new ParametrizedTypeLexer(stream));