diff --git a/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java b/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java index 150e03219e9..0543811400d 100644 --- a/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java +++ b/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java @@ -24,10 +24,8 @@ import java.net.URLClassLoader; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import org.apache.avro.Protocol; -import org.apache.avro.Schema; import org.apache.avro.compiler.specific.SpecificCompiler; import org.apache.avro.generic.GenericData; @@ -91,12 +89,8 @@ protected void doCompile(String filename, File sourceDirectory, File outputDirec for (String warning : idlFile.getWarnings()) { getLog().warn(warning); } - final SpecificCompiler compiler; final Protocol protocol = idlFile.getProtocol(); - getLog().info("Compiling protocol: " + protocol.getNamespace() + "." + protocol.getName()); - getLog().info( - "Schema names: " + protocol.getTypes().stream().map(Schema::getFullName).collect(Collectors.joining(", "))); - compiler = new SpecificCompiler(protocol); + final SpecificCompiler compiler = new SpecificCompiler(protocol); compiler.setStringType(GenericData.StringType.valueOf(stringType)); compiler.setTemplateDir(templateDirectory); compiler.setFieldVisibility(getFieldVisibility()); diff --git a/lang/java/maven-plugin/src/test/java/org/apache/avro/mojo/TestIDLProtocolMojo.java b/lang/java/maven-plugin/src/test/java/org/apache/avro/mojo/TestIDLProtocolMojo.java index acdecf5a3ac..168f4065232 100644 --- a/lang/java/maven-plugin/src/test/java/org/apache/avro/mojo/TestIDLProtocolMojo.java +++ b/lang/java/maven-plugin/src/test/java/org/apache/avro/mojo/TestIDLProtocolMojo.java @@ -21,6 +21,7 @@ import org.junit.Test; import java.io.File; +import java.util.Collections; import java.util.HashSet; import java.util.Set; @@ -52,11 +53,8 @@ public void testIdlProtocolMojo() throws Exception { final String idlUserContent = FileUtils.fileRead(new File(outputDir, "IdlUser.java")); assertTrue(idlUserContent.contains("java.time.Instant")); - assertEquals(asList("[INFO] Compiling protocol: test.IdlTest", "[INFO] Schema names: test.IdlPrivacy, test.IdlUser", - "[WARN] Line 22, char 5: Ignoring out-of-place documentation comment.\n" - + "Did you mean to use a multiline comment ( /* ... */ ) instead?", - "[INFO] Compiling protocol: test.IdlClasspathImportTest", - "[INFO] Schema names: test.IdlPrivacy, test.IdlUser, test.IdlUserWrapper"), log.getLogEntries()); + assertEquals(Collections.singletonList("[WARN] Line 22, char 5: Ignoring out-of-place documentation comment.\n" + + "Did you mean to use a multiline comment ( /* ... */ ) instead?"), log.getLogEntries()); } @Test