jorsol commented on code in PR #172:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/172#discussion_r1096142246


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -1917,7 +1965,7 @@ private DirectoryScanResult computeInputFileTreeChanges( 
IncrementalBuildHelper
             }
             catch ( IOException e )
             {
-                throw new MojoExecutionException( "Error reading old mojo 
status " + mojoConfigFile, e );
+                throw new UncheckedIOException( "Error reading old mojo status 
" + mojoConfigFile, e );

Review Comment:
   Ok, I have changed it to not throw an exception, but to log a warning in the 
case is not possible to read/write the status.
   
   As for the why it's because as part of the refactoring of the code it's 
being used as a lambda and lambdas don't play well with Checked Exceptions, 
that's the reasoning for not throwing an exception and fallback to just skip 
the check.



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to