Github user zhouxinyu commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/21#discussion_r94101719 --- Diff: store/src/main/java/org/apache/rocketmq/store/CommitLog.java --- @@ -1150,15 +1150,15 @@ public AppendMessageResult doAppend(final long fileFromOffset, final ByteBuffer final byte[] propertiesData = msgInner.getPropertiesString() == null ? null : msgInner.getPropertiesString().getBytes(MessageDecoder.CHARSET_UTF8); - final short propertiesLength = propertiesData == null ? 0 : (short) propertiesData.length; + final int propertiesLength = propertiesData == null ? 0 : propertiesData.length; if (propertiesLength > Short.MAX_VALUE) { log.warn("putMessage message properties length too long. length={}", propertiesData.length); return new AppendMessageResult(AppendMessageStatus.PROPERTIES_SIZE_EXCEEDED); } final byte[] topicData = msgInner.getTopic().getBytes(MessageDecoder.CHARSET_UTF8); - final int topicLength = topicData == null ? 0 : topicData.length; --- End diff -- topicData may be null.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---