public static boolean compareRawTaggedFields(List<RawTaggedField> first,
                                                 List<RawTaggedField> second) {
        if (first == null) {
            return second == null || second.isEmpty();
        } else if (second == null) {
            return first.isEmpty();
        } else {
            return first.equals(second);
        }
    }
Compare two RawTaggedFields lists.
A null list is equivalent to an empty one in this context.
clients/src/main/java/org/apache/kafka/common/protocol/MessageUtil.java