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

Ludovic Poitou
21.42.2011 b5cefe1717c14210e2ad24ae5579eb6735ac93d7
Code cleanup removing potential issues detected by FindBugs
2 files modified
26 ■■■■■ changed files
opends/src/server/org/opends/server/schema/AciSyntax.java 22 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java 4 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/AciSyntax.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 */
package org.opends.server.schema;
@@ -63,18 +64,9 @@
   */
  private static final DebugTracer TRACER = getTracer();
  // The default approximate matching rule for this syntax.
  private ApproximateMatchingRule defaultApproximateMatchingRule;
  // The default equality matching rule for this syntax.
  private EqualityMatchingRule defaultEqualityMatchingRule;
  // The default ordering matching rule for this syntax.
  private OrderingMatchingRule defaultOrderingMatchingRule;
  // The default substring matching rule for this syntax.
  private SubstringMatchingRule defaultSubstringMatchingRule;
@@ -99,9 +91,6 @@
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException
  {
    // We don't need an approximate matching rule.
    defaultApproximateMatchingRule = null;
    defaultEqualityMatchingRule =
         DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_IA5_OID);
    if (defaultEqualityMatchingRule == null)
@@ -110,9 +99,6 @@
          EMR_CASE_IGNORE_IA5_OID, SYNTAX_ACI_NAME));
    }
    // We don't need an ordering matching rule.
    defaultOrderingMatchingRule = null;
    defaultSubstringMatchingRule =
         DirectoryServer.getSubstringMatchingRule(SMR_CASE_IGNORE_IA5_OID);
    if (defaultSubstringMatchingRule == null)
@@ -185,7 +171,8 @@
   */
  public OrderingMatchingRule getOrderingMatchingRule()
  {
    return defaultOrderingMatchingRule;
    // We don't have an orderingMatchingRule
    return null;
  }
@@ -215,7 +202,8 @@
   */
  public ApproximateMatchingRule getApproximateMatchingRule()
  {
    return defaultApproximateMatchingRule;
    // we don't have an approximateMatchingRule
    return null;
  }
opends/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
@@ -23,11 +23,13 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 */
package org.opends.server.schema;
import org.opends.server.util.StaticUtils;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Calendar;
@@ -407,7 +409,7 @@
      */
    public int compare(byte[] arg0, byte[] arg1)
    {
      return compare(arg0, arg1);
      return StaticUtils.compare(arg0, arg1);
    }