accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2910) Ineffective null check for replicationSources in Mutation#write()
Date Sun, 15 Jun 2014 03:05:01 GMT

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

ASF subversion and git services commented on ACCUMULO-2910:
-----------------------------------------------------------

Commit e5c785413baefeec2c368c01d4a9c744773fb90a in accumulo's branch refs/heads/master from
[~elserj]
[ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=e5c7854 ]

ACCUMULO-2910 Remove unnecessary null conditional check. Add null-check on setter.


> Ineffective null check for replicationSources in Mutation#write()
> -----------------------------------------------------------------
>
>                 Key: ACCUMULO-2910
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2910
>             Project: Accumulo
>          Issue Type: Bug
>          Components: replication
>            Reporter: Ted Yu
>            Assignee: Josh Elser
>            Priority: Minor
>             Fix For: 1.7.0
>
>
> {code}
>     if (!replicationSources.isEmpty()) {
>       // Use 2nd least-significant bit for whether or not we have replication sources
>       hasValues = (byte) (0x02 | hasValues);
>     }
> ...
>     if (0x02 == (0x02 & hasValues)) {
>       if (null == replicationSources) {
> {code}
> The null check in 'if (0x02' block is ineffective - replicationSources was dereferenced
earlier.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message