andrebrait commented on code in PR #345:
URL: https://github.com/apache/commons-compress/pull/345#discussion_r1059195453
##########
src/main/java/org/apache/commons/compress/archivers/zip/X000A_NTFS.java:
##########
@@ -68,7 +68,14 @@
* @NotThreadSafe
*/
public class X000A_NTFS implements ZipExtraField {
- private static final ZipShort HEADER_ID = new ZipShort(0x000a);
+
+ /**
+ * The header ID for this extra field.
+ *
+ * @since 1.23
+ */
+ public static final ZipShort HEADER_ID = new ZipShort(0x000a);
Review Comment:
Will do if it works properly.
The reason for making it public was that I was testing it before with my
project that uses commons-compress and I had it public to be able to use it
there. I was getting the extra field directly.
But tbh, it makes perfect sense to let it be public if we also have a public
method kn ZipArchiveEntry to fetch an ExtraField based on a ZipLong containing
its identifier. I know having a small API is important, but should anyone need
to fetch that extra field (which is allowed using ZipArchiveEntry) it's quite
frustrating, as the user, that I need to maintain a bunch of my own constants,
copied from this class, instead of having this class expose this itself.
--
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]