From 4bc6b59431547bfa850443e367b3699d19bb7586 Mon Sep 17 00:00:00 2001 From: Valera V Harseko Date: Tue, 22 Oct 2024 11:57:56 +0300 Subject: [PATCH 1/2] FIX makeldif -c suffix=dc=example: Unable to parse a constant argument expecting name=value --- .../main/java/com/forgerock/opendj/ldap/tools/MakeLDIF.java | 4 ++-- 1 file changed, 2 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..9297ebf330 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 @@ -269,11 +269,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; } From fcc7544e3c413f94f6685cdaeb8cbd1bc873cd18 Mon Sep 17 00:00:00 2001 From: Valera V Harseko Date: Tue, 22 Oct 2024 11:59:53 +0300 Subject: [PATCH 2/2] FIX makeldif -c suffix=dc=example: Unable to parse a constant argument expecting name=value --- .../src/main/java/com/forgerock/opendj/ldap/tools/MakeLDIF.java | 1 + 1 file changed, 1 insertion(+) 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 9297ebf330..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;