opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/BasicMonitoringAttributes.java
@@ -22,7 +22,7 @@ * * * Copyright 2009 Sun Microsystems, Inc. * Portions Copyright 2014 ForgeRock AS * Portions Copyright 2014-2015 ForgeRock AS */ package org.opends.guitools.controlpanel.datamodel; @@ -382,7 +382,7 @@ this == MAX_MEMORY || this == USED_MEMORY; isTime = attributeName.indexOf("time") != -1; isTime = attributeName.contains("time"); isNumeric = !isGMTDate() && opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SimplifiedViewEntryPanel.java
@@ -486,7 +486,7 @@ { Object v = values.get(0); if (v instanceof String && ((String) v).indexOf("\n") != -1) && ((String) v).contains("\n")) { gbc.anchor = GridBagConstraints.NORTHWEST; } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
@@ -2056,7 +2056,7 @@ final String fileName = getSchemaFile(fileElement); if (fileName != null) { return contains(standardSchemaFileNames, fileName) || fileName.toLowerCase().indexOf("-rfc") != -1; return contains(standardSchemaFileNames, fileName) || fileName.toLowerCase().contains("-rfc"); } else if (fileElement instanceof CommonSchemaElements) { opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/TargAttrFilters.java
@@ -182,40 +182,27 @@ * Check that there are not too many filter lists. There can only * be either one or two. */ String[] filterLists= subExpression.split(secondOp, -1); String[] filterLists = subExpression.split(secondOp, -1); if(filterLists.length > 2) { LocalizableMessage message = WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_MAX_FILTER_LISTS. get(expression); throw new AciException(message); throw new AciException(WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_MAX_FILTER_LISTS.get(expression)); } else if (filterLists.length == 1) { //Check if the there is something like ") , deel=". A bad token //that the regular expression didn't pick up. String [] filterList2=subExpression.split(secondOpSeparator); if(filterList2.length == 2) { LocalizableMessage message = WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION. get(expression); throw new AciException(message); throw new AciException(WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION.get(expression)); } String rg = getReverseOp(firstOp) + "="; //This check catches the case where there might not be a //',' character between the first filter list and the second. if(subExpression.indexOf(rg) != -1) { LocalizableMessage message = WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION. get(expression); throw new AciException(message); if (subExpression.contains(rg)) { throw new AciException(WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION.get(expression)); } } filterLists[0]=filterLists[0].trim(); //First filter list must end in an ')' character. if(!filterLists[0].endsWith(")")) { LocalizableMessage message = WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION. get(expression); throw new AciException(message); throw new AciException(WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION.get(expression)); } TargAttrFilterList firstFilterList = TargAttrFilterList.decode(getMask(firstOp), filterLists[0]); @@ -225,10 +212,7 @@ String filterList=filterLists[1].trim(); //Second filter list must start with a '='. if(!filterList.startsWith("=")) { LocalizableMessage message = WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION. get(expression); throw new AciException(message); throw new AciException(WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_EXPRESSION.get(expression)); } String temp2= filterList.substring(1,filterList.length()); //Assume the first op is an "add" so this has to be a "del". opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/Target.java
@@ -22,7 +22,7 @@ * * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2014 ForgeRock AS * Portions Copyright 2014-2015 ForgeRock AS */ package org.opends.server.authorization.dseecompat; @@ -86,7 +86,7 @@ throw new AciException(WARN_ACI_SYNTAX_INVALID_TARGETKEYWORD_EXPRESSION.get(target)); } LDAPURL targetURL = LDAPURL.decode(target, false); if(targetURL.getRawBaseDN().indexOf("*") != -1) { if (targetURL.getRawBaseDN().contains("*")) { this.isPattern=true; patternDN = PatternDN.decodeSuffix(targetURL.getRawBaseDN()); } else { opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/UserDN.java
@@ -147,7 +147,7 @@ EnumUserDNType type; String str=bldr.toString(); if(str.indexOf("?") != -1) { if (str.contains("?")) { type = EnumUserDNType.URL; } else if(str.equalsIgnoreCase("ldap:///self")) { type = EnumUserDNType.SELF; @@ -161,7 +161,7 @@ } else if(str.equalsIgnoreCase("ldap:///all")) { type = EnumUserDNType.ALL; bldr.replace(0, bldr.length(), urlStr); } else if(str.indexOf("*") != -1) { } else if (str.contains("*")) { type = EnumUserDNType.DNPATTERN; } else { type = EnumUserDNType.DN; opendj-server-legacy/src/test/java/org/opends/server/replication/SchemaReplicationTest.java
@@ -286,7 +286,7 @@ byte[] bytes = new byte[input.available()]; input.read(bytes); String fileStr = new String(bytes); if (fileStr.indexOf(stateStr) != -1) if (fileStr.contains(stateStr)) { break; }