ppkarwasz commented on code in PR #712:
URL: https://github.com/apache/commons-compress/pull/712#discussion_r2379866510
##########
src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java:
##########
@@ -48,8 +48,7 @@
*
* @Immutable
*/
-// CheckStyle:HideUtilityClassConstructorCheck OFF (bc)
-public class TarUtils {
+public final class TarUtils {
Review Comment:
I wouldn’t propose a change that breaks binary compatibility for users.
You’re correct that in general marking a class `final` is a
binary-incompatible change, but in this specific case the rule only applies if
the class **can be subclassed**. Since `TarUtils` has a **private constructor**
and no nested subclasses, it cannot be extended, so making it `final` does not
remove any legal use and therefore does not break compatibility.
This is a subtle edge case: tools like **BND** recognize it correctly, while
**JapiCmp** currently does not.
--
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]