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

Jean-Noel Rouvignac
21.49.2014 5ae697173eec0227912b95b7fb51e28e30e41e88
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/MenuBuilder.java
@@ -600,12 +600,8 @@
        TableBuilder nbuilder = new TableBuilder();
        Map<String, MenuCallback<T>> callbacks = new HashMap<String, MenuCallback<T>>();
        // Determine whether multiple columns should be used for numeric
        // options.
        boolean useMultipleColumns = false;
        if (threshold >= 0 && numericCallbacks.size() >= threshold) {
            useMultipleColumns = true;
        }
        // Determine whether multiple columns should be used for numeric options
        boolean useMultipleColumns = threshold >= 0 && numericCallbacks.size() >= threshold;
        // Create optional column headers.
        if (!columnHeadings.isEmpty()) {
opendj-sdk/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/PropertySet.java
@@ -142,10 +142,8 @@
        /** {@inheritDoc} */
        @Override
        public boolean isModified() {
            if (activeValues.size() == pendingValues.size() && activeValues.containsAll(pendingValues)) {
                return false;
            }
            return true;
            return activeValues.size() != pendingValues.size()
                    || !activeValues.containsAll(pendingValues);
        }
        /**
opendj-sdk/opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/PropertyValueEditor.java
@@ -1970,12 +1970,7 @@
            // Create an option for editing/viewing each property.
            for (PropertyDefinition<?> pd : c) {
                // Determine whether this property should be modifiable.
                boolean isReadOnly = false;
                if (pd.hasOption(PropertyOption.MONITORING)) {
                    isReadOnly = true;
                }
                boolean isReadOnly = pd.hasOption(PropertyOption.MONITORING);
                if (!isCreate && pd.hasOption(PropertyOption.READ_ONLY)) {
                    isReadOnly = true;
                }
opendj-sdk/opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/SubCommandHandler.java
@@ -926,10 +926,7 @@
     * @return Returns <code>true</code> if the user requested record-mode.
     */
    protected final boolean isRecordMode() {
        if (recordModeArgument != null) {
            return recordModeArgument.isPresent();
        }
        return false;
        return recordModeArgument != null && recordModeArgument.isPresent();
    }
    /**
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/io/ASN1ByteSequenceReader.java
@@ -87,7 +87,6 @@
                && !needFirstLengthByteState(false)) {
            return false;
        }
        return peekLength <= reader.remaining();
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/io/ASN1InputStreamReader.java
@@ -102,7 +102,6 @@
                && !needAdditionalLengthBytesState(false, false)) {
            return false;
        }
        return peekLength <= in.available();
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java
@@ -673,8 +673,7 @@
            final MatchingRule rule = attributeType.getEqualityMatchingRule();
            if (rule != null) {
                final Comparator<ByteSequence> comparator = rule.comparator();
                return comparator.compare(normalizedValue, otherNormalizedValue) != 0 ? false
                        : true;
                return comparator.compare(normalizedValue, otherNormalizedValue) == 0;
            } else {
                return normalizedValue.equals(otherNormalizedValue);
            }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractAttribute.java
@@ -62,22 +62,14 @@
        if (attribute == object) {
            return true;
        }
        if (!(object instanceof Attribute)) {
            return false;
        }
        final Attribute other = (Attribute) object;
        if (!attribute.getAttributeDescription().equals(other.getAttributeDescription())) {
            return false;
        }
        // Attribute description is the same, compare values.
        if (attribute.size() != other.size()) {
            return false;
        }
        return attribute.containsAll(other);
        return attribute.getAttributeDescription().equals(other.getAttributeDescription())
                && attribute.size() == other.size()
                && attribute.containsAll(other);
    }
    /**
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RequestHandlerFactoryAdapter.java
@@ -602,17 +602,10 @@
                    }
                }
            } else {
                final RequestContextImpl<R, ResultHandler<R>> requestContext;
                if (request.getOID().equals(StartTLSExtendedRequest.OID)) {
                    // StartTLS requests cannot be cancelled.
                    requestContext =
                            new RequestContextImpl<R, ResultHandler<R>>(this, resultHandler,
                                    messageID, false);
                } else {
                    requestContext =
                            new RequestContextImpl<R, ResultHandler<R>>(this, resultHandler,
                                    messageID, true);
                }
                // StartTLS requests cannot be cancelled.
                boolean isCancelSupported = !request.getOID().equals(StartTLSExtendedRequest.OID);
                final RequestContextImpl<R, ResultHandler<R>> requestContext =
                        new RequestContextImpl<R, ResultHandler<R>>(this, resultHandler, messageID, isCancelSupported);
                if (addPendingRequest(requestContext)) {
                    requestHandler.handleExtendedRequest(requestContext, request,
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/VirtualListViewRequestControl.java
@@ -457,7 +457,7 @@
     *         {@code false} if this control is using a target assertion.
     */
    public boolean hasTargetOffset() {
        return assertionValue != null ? false : true;
        return assertionValue == null;
    }
    /** {@inheritDoc} */
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/UserPasswordSyntaxImpl.java
@@ -132,14 +132,8 @@
            return false;
        }
        // The closing curly brace must not be the last character of the
        // password.
        if (closingBracePos == value.length() - 1) {
            return false;
        }
        // If we've gotten here, then it looks to be encoded.
        return true;
        // The closing curly brace must not be the last character of the password
        return closingBracePos != value.length() - 1;
    }
    @Override
opendj-sdk/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/Controls.java
@@ -1083,10 +1083,7 @@
     * @return True if the control is supported.
     */
    static boolean isSupported(final String control) {
        if (controls != null && !controls.isEmpty()) {
            return controls.contains(control);
        }
        return false;
        return controls != null && controls.contains(control);
    }
    // --- JCite check support ---
opendj-sdk/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/ExtendedOperations.java
@@ -194,10 +194,7 @@
     * @return True if the control is supported.
     */
    static boolean isSupported(final String extendedOperation) {
        if (extendedOperations != null && !extendedOperations.isEmpty()) {
            return extendedOperations.contains(extendedOperation);
        }
        return false;
        return extendedOperations != null && extendedOperations.contains(extendedOperation);
    }
    // --- JCite check support ---
opendj-sdk/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Context.java
@@ -143,22 +143,11 @@
        boolean isMatchingRead(final SearchRequest request) {
            // Cached reads are always base object.
            if (!request.getScope().equals(SearchScope.BASE_OBJECT)) {
                return false;
            }
            // Filters must match.
            if (!request.getFilter().toString().equals(cachedFilterString)) {
                return false;
            }
            // List of requested attributes must match.
            if (!request.getAttributes().equals(cachedRequest.getAttributes())) {
                return false;
            }
            // Don't need to check anything else.
            return true;
            return request.getScope().equals(SearchScope.BASE_OBJECT)
                    // Filters must match.
                    && request.getFilter().toString().equals(cachedFilterString)
                    // List of requested attributes must match.
                    && request.getAttributes().equals(cachedRequest.getAttributes());
        }
        void setPromise(final LdapPromise<Result> promise) {