rocketmq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ROCKETMQ-244) Message#putUserProperty uses == for String comparison
Date Fri, 14 Jul 2017 03:30:01 GMT

    [ https://issues.apache.org/jira/browse/ROCKETMQ-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086789#comment-16086789
] 

ASF GitHub Bot commented on ROCKETMQ-244:
-----------------------------------------

Github user Jaskey commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq/pull/131#discussion_r126942559
  
    --- Diff: common/src/test/java/org/apache/rocketmq/common/message/MessageTest.java ---
    @@ -0,0 +1,68 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.rocketmq.common.message;
    +
    +import org.junit.Assert;
    +import org.junit.Test;
    +
    +import static org.apache.rocketmq.common.message.MessageConst.PROPERTY_TRACE_SWITCH;
    +import static org.junit.Assert.*;
    +
    +public class MessageTest {
    --- End diff --
    
    What about renaming to MessagePropertyTest since it is all about the message property


> Message#putUserProperty uses == for String comparison
> -----------------------------------------------------
>
>                 Key: ROCKETMQ-244
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-244
>             Project: Apache RocketMQ
>          Issue Type: Bug
>          Components: rocketmq-commons
>    Affects Versions: 4.1.0-incubating
>            Reporter: Roman Shtykh
>            Assignee: Roman Shtykh
>
> {{value.trim() == ""}} won't be equal.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message