Stephan202 commented on code in PR #170:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/170#discussion_r1090181663


##########
src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java:
##########
@@ -80,13 +79,12 @@ private void assertGeneratedSourceFileFor( String 
sourceClass, List<String> sour
                 try
                 {
                     String[] nameParts = sourceClass.split( "\\." );
-                    String content = FileUtils.fileRead( f );
+                    String content = new String( Files.readAllBytes( 
f.toPath() ) );

Review Comment:
   I wonder: shouldn't this code call one of the [two-arg `String` 
constructors](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#%3Cinit%3E(byte%5B%5D,java.lang.String))
 and pass in the charset specified by `project.build.sourceEncoding`?



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