clesaec commented on code in PR #2334:
URL: https://github.com/apache/avro/pull/2334#discussion_r1262482522


##########
lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java:
##########
@@ -213,7 +213,9 @@ public void execute() throws MojoExecutionException {
     if (hasImports) {
       for (String importedFile : imports) {
         File file = new File(importedFile);
-        if (file.isDirectory()) {
+        if (!file.exists()) {

Review Comment:
   On line 256, getIncludedFiles method scan for all imports ...
   ```
         for (String importFile : this.imports) {
           File file = new File(importFile);
     ...
   ```
   So, if you have 2 files, and only the first exists, this second method will 
encountered this unexisting file before the "execute()" method. So, even if 
used method (isFile & isDirectory) won't fails, i found that checking before 
using cleaner.
   



-- 
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]

Reply via email to