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

jvergara
07.27.2009 ffa1e3ba39812d1f3a2a4a468bcf93e781e7073e
Fix for issue 3194 (ldapcompare should complain about extra arguments)
Add an extra check.
2 files modified
13 ■■■■■ changed files
opendj-sdk/opends/src/messages/messages/tools.properties 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/messages/messages/tools.properties
@@ -2471,4 +2471,8 @@
SEVERE_ERR_STOPDS_DATETIME_ALREADY_PASSED_1669=The specified stop time '%s' \
 has already passed
 
SEVERE_ERR_LDAPCOMPARE_FILENAME_AND_DNS_1670=Both entry DNs and a file name \
 were provided for the compare operation.  These arguments are not compatible
 
opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
@@ -659,6 +659,15 @@
      return 1;
    }
    // If trailing DNs were provided and the filename argument was also
    // provided, exit with an error.
    if (!dnStrings.isEmpty() && filename.isPresent())
    {
      err.println(wrapText(ERR_LDAPCOMPARE_FILENAME_AND_DNS.get(),
          MAX_LINE_WIDTH));
      return 1;
    }
    // parse the attribute string
    int idx = attributeString.indexOf(":");
    if(idx == -1)