[ https://issues.apache.org/jira/browse/HADOOP-18029?focusedWorklogId=688432&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-688432 ]
ASF GitHub Bot logged work on HADOOP-18029: ------------------------------------------- Author: ASF GitHub Bot Created on: 01/Dec/21 05:55 Start Date: 01/Dec/21 05:55 Worklog Time Spent: 10m Work Description: Desmeister commented on a change in pull request #3739: URL: https://github.com/apache/hadoop/pull/3739#discussion_r759873860 ########## File path: hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCodecFactory.java ########## @@ -137,9 +138,15 @@ private static CompressionCodecFactory setClasses(Class[] classes) { private static void checkCodec(String msg, Class expected, CompressionCodec actual) { - assertEquals(msg + " unexpected codec found", - expected.getName(), - actual.getClass().getName()); + if (expected == null) { + assertNull(msg, actual); + } else if (actual == null) { Review comment: Yes; assertNull has a detailed builtin message. Here's an example of the new messages: When a result was expected: `java.lang.AssertionError: default factory for .gz result was null` When null was expected: `java.lang.AssertionError: default factory for .gz expected null, but was:<org.apache.hadoop.io.compress.GzipCodec@3108bc>` -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 688432) Time Spent: 50m (was: 40m) > Update CompressionCodecFactory to handle uppercase file extensions > ------------------------------------------------------------------ > > Key: HADOOP-18029 > URL: https://issues.apache.org/jira/browse/HADOOP-18029 > Project: Hadoop Common > Issue Type: Improvement > Components: common, io, test > Environment: Tested locally on macOS 11.6.1, IntelliJ IDEA 2021.2.3, > running maven commands through terminal. Forked from trunk branch on November > 29th, 2021. > Reporter: Desmond Sisson > Assignee: Desmond Sisson > Priority: Minor > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > I've updated the CompressionCodecFactory to be able to handle filenames with > capitalized compression extensions. Two of the three maps internal to the > class which are used to store codecs have existing lowercase casts, but it is > absent from the call inside getCodec() used for comparing path names. > I updated the corresponding unit test in TestCodecFactory, to include > intended use cases, and confirmed the test passes with the change. I also > updated the error message in the case of a null from an NPE to a rich error > message. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org