From df9b759027b8ac2d275fdb346095498d44bf22a1 Mon Sep 17 00:00:00 2001 From: Valery Kharseko Date: Tue, 22 Oct 2024 14:17:41 +0300 Subject: [PATCH] FIX makeldif -c suffix=dc=example: Unable to parse a constant argument expecting name=value (#443) --- .../main/java/com/forgerock/opendj/ldap/tools/MakeLDIF.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/MakeLDIF.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/MakeLDIF.java index 29e0b3989e..06ae856630 100644 --- a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/MakeLDIF.java +++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/MakeLDIF.java @@ -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; @@ -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; }