ecki commented on code in PR #829:
URL: https://github.com/apache/commons-compress/pull/829#discussion_r4409365625


##########
src/main/java/org/apache/commons/compress/harmony/pack200/ClassBands.java:
##########
@@ -964,7 +965,8 @@ public void finaliseBands() {
         }
 
         // Sort non-predefined attribute bands
-        final Comparator<NewAttributeBands> comparator = (arg0, arg1) -> 
arg0.getFlagIndex() - arg1.getFlagIndex();
+        //Refactorizacion

Review Comment:
   Please don’t comment that code is refactored 



##########
src/main/java/org/apache/commons/compress/harmony/unpack200/SegmentConstantPoolArrayCache.java:
##########
@@ -172,9 +173,10 @@ public List<Integer> indexesForArrayKey(final String[] 
array, final String key)
         // efficient because we are usually looking for
         // several secondary elements with the same primary
         // key.
-        if (lastArray == array && lastKey == key) {
+        final boolean sameLookupAsLast = lastArray == array && 
Objects.equals(lastKey, key);
+        if (sameLookupAsLast) {

Review Comment:
   Please don’t that doesnt make it much more readable 



##########
src/main/java/org/apache/commons/compress/harmony/archive/internal/nls/Messages.java:
##########
@@ -32,7 +32,8 @@
 import java.util.MissingResourceException;
 import java.util.Objects;
 import java.util.ResourceBundle;
-
+import java.util.logging.Level;
+import java.util.logging.Logger;

Review Comment:
   Is JUL used commonly in the project?



##########
src/main/java/org/apache/commons/compress/harmony/archive/internal/nls/Messages.java:
##########
@@ -45,15 +46,25 @@
  */
 public class Messages {
 
+
     // ResourceBundle holding the system messages.
     private static ResourceBundle bundle;
 
+    private static final String BUNDLE_NAME =
+            
"org.apache.commons.compress.harmony.archive.internal.nls.messages"; 
//$NON-NLS-1$
+
     static {
+        bundle = loadBundle();

Review Comment:
   That looks useful 



##########
src/main/java/org/apache/commons/compress/harmony/pack200/PopulationCodec.java:
##########
@@ -139,6 +125,20 @@ public int[] decodeInts(final int n, final InputStream in) 
throws IOException, P
         }
         return result;
     }
+    private static BHSDCodec deriveTokenCodec(final int k, final int l) throws 
Pack200Exception {

Review Comment:
   That’s a single use function?



-- 
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]

Reply via email to