arturobernalg commented on code in PR #3589:
URL: https://github.com/apache/maven-surefire/pull/3589#discussion_r4551021714
##########
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java:
##########
@@ -43,6 +48,27 @@ public static String stripIllegalFilenameChars(String
original) {
return result.toString();
}
+ /**
+ * Shortens a report file name that would otherwise exceed common
filesystem limits
+ * (e.g. a deeply nested, long test class name), keeping it unique by
appending a hash
+ * of the untruncated name.
+ *
+ * @param fileName the file name, including its extension
+ * @return {@code fileName} unchanged if it already fits, otherwise a
truncated name of
+ * the same extension
+ */
+ public static String truncateFileName(String fileName) {
Review Comment:
Done - package-private now.
--
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]