Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX makeldif -c suffix=dc=example: Unable to parse a constant argument expecting name=value #443

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
* Copyright 2006-2010 Sun Microsystems, Inc.
* Portions Copyright 2013-2016 ForgeRock AS.
* Portions Copyright 2024 3A Systems, LLC
*/
package com.forgerock.opendj.ldap.tools;

Expand Down Expand Up @@ -269,11 +270,11 @@ private static boolean addConstantsToGenerator(StringArgument constants, EntryGe
final ConsoleApplication app) {
for (final String constant : constants.getValues()) {
final String[] chunks = constant.split("=");
if (chunks.length != 2) {
if (chunks.length < 1) {
app.errPrintln(ERR_CONSTANT_ARG_CANNOT_DECODE.get(constant));
return false;
}
generator.setConstant(chunks[0], chunks[1]);
generator.setConstant(chunks[0], constant.replaceFirst(chunks[0]+"=",""));
}
return true;
}
Expand Down
Loading