You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2019/05/12 05:55:00 UTC
[jira] [Updated] (DIRAPI-303) If and else-if branches has the same
condition
[ https://issues.apache.org/jira/browse/DIRAPI-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny updated DIRAPI-303:
-------------------------------------
Fix Version/s: (was: 2.0.0)
2.0.0.AM3
> If and else-if branches has the same condition
> ----------------------------------------------
>
> Key: DIRAPI-303
> URL: https://issues.apache.org/jira/browse/DIRAPI-303
> Project: Directory Client API
> Issue Type: Bug
> Affects Versions: 1.0.0-RC2
> Reporter: songwanging
> Priority: Major
> Fix For: 2.0.0.AM3
>
>
> Our tool DeepTect has detected a piece of buggy code snippet, in which the if and else branches has the same condition.
> Path: directory-ldap-api/util/src/main/java/org/apache/directory/api/util/Unicode.java
> {code:java}
> public static char bytesToChar( byte[] bytes, int pos ){
> ...
> else if ( ( bytes[pos] & UTF8_FIVE_BYTES_MASK ) == UTF8_FIVE_BYTES ){
> // Five bytes char
> ...
> }
> else if ( ( bytes[pos] & UTF8_FIVE_BYTES_MASK ) == UTF8_FIVE_BYTES ){
> // Six bytes char
> ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)