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

Jean-Noel Rouvignac
16.02.2015 e3fed6978fb8085b119df2966b5c27785756d70b
AutoRefactor: use String.contains()
4 files modified
16 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/DNS.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPRequestHandler.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
@@ -1103,12 +1103,12 @@
        // this connection handler is the right one.
        // See org.opends.server.protocols.ldap.LDAPConnectionHandler to see
        // how the DN of the monitoring entry is generated.
        if (key.indexOf(getKey("port "+ch.getPort())) != -1)
        if (key.contains(getKey("port " + ch.getPort())))
        {
          boolean hasAllAddresses = true;
          for (InetAddress a : ch.getAddresses())
          {
            if (key.indexOf(getKey(a.getHostAddress())) == -1)
            if (!key.contains(getKey(a.getHostAddress())))
            {
              hasAllAddresses = false;
              break;
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/DNS.java
@@ -111,7 +111,7 @@
            // rules and on some systems the canonical representation is
            // configured to be "localhost.localdomain" which may not be known
            // to the administrator.
            if (hn.indexOf("*") < 0)
            if (!hn.contains("*"))
            {
              try
              {
opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPRequestHandler.java
@@ -143,9 +143,9 @@
      if ((stackElements != null) && (stackElements.length > 0))
      {
        StackTraceElement ste = stackElements[0];
        if (ste.getClassName().equals("sun.nio.ch.DevPollArrayWrapper") &&
            (ste.getMethodName().indexOf("poll") >= 0) &&
            ioe.getMessage().equalsIgnoreCase("Invalid argument"))
        if (ste.getClassName().equals("sun.nio.ch.DevPollArrayWrapper")
            && ste.getMethodName().contains("poll")
            && ioe.getMessage().equalsIgnoreCase("Invalid argument"))
        {
          LocalizableMessage message = ERR_LDAP_REQHANDLER_DETECTED_JVM_ISSUE_CR6322825.get(ioe);
          throw new InitializationException(message, ioe);
opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
@@ -408,13 +408,13 @@
    }
    // It must contain at least one period.
    if (oid.indexOf(".") < 0)
    if (!oid.contains("."))
    {
      return false;
    }
    // It must not contain any double periods.
    if (oid.indexOf("..") >= 0)
    if (oid.contains(".."))
    {
      return false;
    }