ppkarwasz commented on PR #673:
URL: https://github.com/apache/commons-compress/pull/673#issuecomment-2925166305

   > Many archivers rely on the constants defined in ArchiveStreamFactory, and 
ArchiveStreamFactory relies on the individual archiver classes. This is 
currently a build cycle.
   
   I am not entirely sure I understand what you mean. Can you provide a 
concrete example of problem you are trying to solve?
   
   > Better this way?
   
   Are you familiar with how compile-time constants work in Java?
   
   In Java, constant fields whose values can be fully determined at compile 
time are *inlined* by the compiler. For example, in the code below, both 
`ArchiveStreamConstants.APK` and `ArchiveStreamFactory.APK` are treated as 
compile-time constants:
   
   ```java
   public static final String APK = ArchiveStreamConstants.APK;
   ```
   
   Because of this inlining behavior, introducing a separate 
`ArchiveStreamConstants` class might not provide the benefits you're aiming 
for, since the constants are effectively duplicated and the new class doesn't 
reduce dependencies in practice.
   


-- 
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...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to