martin-g commented on a change in pull request #1341:
URL: https://github.com/apache/avro/pull/1341#discussion_r711792595
##########
File path: lang/java/compiler/pom.xml
##########
@@ -228,6 +228,11 @@
<!-- can only be used from within ant -->
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>${mockito.version}</version>
Review comment:
Does it need `<scope>test</scope>`? I didn't find a dependencyManagement
in the parent poms for it.
##########
File path:
lang/java/compiler/src/test/java/org/apache/avro/compiler/schema/TestSchemas.java
##########
@@ -38,36 +59,11 @@
+ "
{\"name\":\"methodName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}\n"
+ " ]}},\n" + "
{\"name\":\"node\",\"type\":\"SampleNode\"}]}}}" + "]}";
- private static class PrintingVisitor implements SchemaVisitor {
-
- @Override
- public SchemaVisitorAction visitTerminal(Schema terminal) {
- System.out.println("Terminal: " + terminal.getFullName());
- return SchemaVisitorAction.CONTINUE;
- }
-
- @Override
- public SchemaVisitorAction visitNonTerminal(Schema terminal) {
- System.out.println("NONTerminal start: " + terminal.getFullName());
- return SchemaVisitorAction.CONTINUE;
- }
-
- @Override
- public SchemaVisitorAction afterVisitNonTerminal(Schema terminal) {
- System.out.println("NONTerminal end: " + terminal.getFullName());
- return SchemaVisitorAction.CONTINUE;
- }
-
- @Override
- public Object get() {
- return null;
- }
Review comment:
I don't see much value in introducing Mockito for this. This visitor is
very simple! It looks even simpler than the new Mockito based one.
##########
File path: lang/java/pom.xml
##########
@@ -65,6 +65,7 @@
<exec-plugin.version>3.0.0</exec-plugin.version>
<file-management.version>3.0.0</file-management.version>
<javacc-plugin.version>2.6</javacc-plugin.version>
+ <mockito.version>3.9.0</mockito.version>
Review comment:
Why 3.9.0 ?
Current latest is 3.12.4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]