mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Chris Ridd
25.58.2015 ee8adac5225770115e0106224b7911fe9c7f9ba9
OPENDJ-2299 Correct range checking in ResultCode.valueOf()
1 files modified
4 ■■■■ changed files
opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ResultCode.java 4 ●●●● patch | view | raw | blame | history
opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ResultCode.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions copyright 2013-2015 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -704,7 +704,7 @@
    public static ResultCode valueOf(final int intValue) {
        ResultCode resultCode = null;
        if (intValue >= 0 || intValue < ELEMENTS.length) {
        if (0 <= intValue && intValue < ELEMENTS.length) {
            resultCode = ELEMENTS[intValue];
        }