elharo commented on code in PR #248:
URL: https://github.com/apache/maven-archetype/pull/248#discussion_r1885696885
##########
archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java:
##########
@@ -1632,6 +1634,18 @@ private FileSet getUnpackagedFileSet(
return createFileSet(excludes, false, filtered, group, includes,
defaultEncoding);
}
+ private String getFileCharsetEncoding(File detectedFile, String
defaultEncoding) {
+ try (FileInputStream fileInputStream = new
FileInputStream(detectedFile);
+ BufferedInputStream is = new
BufferedInputStream(fileInputStream)) {
Review Comment:
I filed the issue because the helper class was very poorly designed and
implemented. I didn't initially realize it was only used in one place and could
be inlined so neatly and trivially. However it turns out that it can, and this
PR noticeably simplifies the archetype creator class as well as eliminating the
charset detectpr class. It's good work.
--
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]