dschmidt commented on code in PR #2943:
URL: https://github.com/apache/tika/pull/2943#discussion_r3563800195
##########
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-audiovideo-module/src/main/java/org/apache/tika/parser/mp3/ID3v22Handler.java:
##########
@@ -113,6 +113,13 @@ private ID3Comment getComment(byte[] data, int offset, int
length) {
return ID3v2Frame.getComment(data, offset, length);
}
+ /** Skips null comments (malformed frames) that would trip up consumers. */
+ private void addComment(ID3Comment comment) {
+ if (comment != null) {
+ comments.add(comment);
+ }
+ }
Review Comment:
major nitpick: tbh when I saw a helper function being introduced, I expected
it to do more than j́ust a simple null check. Same as underneath. I would
probably do it inline if the function isnt called a bunch of times
--
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]