diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java index a3110917c0..96348e88ac 100644 --- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java +++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java @@ -14,6 +14,7 @@ * Copyright 2009-2010 Sun Microsystems, Inc. * Portions Copyright 2014 Manuel Gaupp * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC. */ package org.forgerock.opendj.ldap.schema; @@ -2116,7 +2117,7 @@ public boolean removeSyntax(final String numericOID) { final Syntax element = numericOID2Syntaxes.get(numericOID); if (element != null) { - removeSyntax(element, null); + removeSyntax(element); return true; } return false; @@ -2490,7 +2491,7 @@ SchemaBuilder addSyntax(final Syntax syntax, final boolean overwrite) { syntax, syntax.getOID(), conflictingSyntax.getOID()); throw new ConflictingSchemaElementException(message); } - removeSyntax(conflictingSyntax, null); + removeSyntax(conflictingSyntax); } numericOID2Syntaxes.put(syntax.getOID(), syntax); @@ -2688,7 +2689,7 @@ private void removeObjectClass(final ObjectClass oc, NamesMapping names) { } } - private void removeSyntax(final Syntax syntax, NamesMapping names) { + private void removeSyntax(final Syntax syntax) { for (Map.Entry> property : syntax.getExtraProperties().entrySet()) { if ("x-enum".equalsIgnoreCase(property.getKey())) { removeMatchingRule(OMR_OID_GENERIC_ENUM + "." + syntax.getOID()); @@ -2705,7 +2706,7 @@ private void validate(final Schema schema, NamesMapping names) { try { syntax.validate(schema, warnings); } catch (final SchemaException e) { - removeSyntax(syntax, names); + removeSyntax(syntax); warnings.add(ERR_SYNTAX_VALIDATION_FAIL.get(syntax, e.getMessageObject())); } } diff --git a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LdapJsonConfigurator.java b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LdapJsonConfigurator.java index abf70da203..477167fd5d 100644 --- a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LdapJsonConfigurator.java +++ b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Rest2LdapJsonConfigurator.java @@ -318,8 +318,7 @@ private static SubResource configureSubResource(final String urlTemplate, return configureCollectionSubResource( config, resourceId, urlTemplate, dnTemplate, isReadOnly); } else { - return configureSingletonSubResource( - config, resourceId, urlTemplate, dnTemplate, isReadOnly); + return configureSingletonSubResource(resourceId, urlTemplate, dnTemplate, isReadOnly); } } @@ -372,8 +371,7 @@ private static void configureCollectionNamingStrategy(final JsonValue config, } } - private static SubResource configureSingletonSubResource(final JsonValue config, - final String resourceId, + private static SubResource configureSingletonSubResource(final String resourceId, final String urlTemplate, final String dnTemplate, final Boolean isReadOnly) { diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/BrowserController.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/BrowserController.java index edfc629eb4..f53e7d6673 100644 --- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/BrowserController.java +++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/BrowserController.java @@ -575,22 +575,11 @@ public void notifyEntryChanged(BrowserNodeInfo nodeInfo) { /** Notify this controller that authentication data have changed in the connection pool. */ @Override public void notifyAuthDataChanged() { - notifyAuthDataChanged(null); - } - - /** - * Notify this controller that authentication data have changed in the - * connection pool for the specified url. - * The controller starts refreshing the node which represent entries from the - * url. - * @param url the URL of the connection that changed. - */ - private void notifyAuthDataChanged(LDAPURL url) { // TODO: temporary implementation // we should refresh only nodes : - // - whose URL matches 'url' + // - whose URL matches the URL of the connection that changed // - whose errorType == ERROR_SOLVING_REFERRAL and - // errorArg == url + // errorArg == that URL startRefreshReferralNodes(rootNode); } diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java index d5148d8411..69d046c867 100644 --- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java +++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java @@ -13,6 +13,7 @@ * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2014-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC. */ package org.opends.guitools.controlpanel.task; @@ -158,7 +159,7 @@ public void run() { final List args = getObfuscatedCommandLineArguments(getDSConfigCommandLineArguments(index)); args.removeAll(getConfigCommandLineArguments()); - printEquivalentCommandLine(getConfigCommandLineName(index), args, + printEquivalentCommandLine(getConfigCommandLineName(), args, INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_DELETE_INDEX.get()); } }); @@ -307,7 +308,7 @@ protected ArrayList getCommandLineArguments() * @return the path of the command line to be used to delete the specified * index. */ - private String getConfigCommandLineName(AbstractIndexDescriptor index) + private String getConfigCommandLineName() { if (isServerRunning()) { diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java index edaafa19e6..e2e129f06f 100644 --- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java +++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromConnection.java @@ -273,7 +273,7 @@ public void readConfiguration(final ConnectionWrapper connWrapper) hmConnectionHandlersMonitor.clear(); - readSchemaIfNeeded(connWrapper, errors); + readSchemaIfNeeded(connWrapper); try { @@ -324,7 +324,7 @@ public void readConfiguration(final ConnectionWrapper connWrapper) exceptions = Collections.unmodifiableList(errors); } - private void readSchemaIfNeeded(final ConnectionWrapper connWrapper, final List errors) + private void readSchemaIfNeeded(final ConnectionWrapper connWrapper) { if (mustReadSchema()) { diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/ZipExtractor.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/ZipExtractor.java index 883f3fb283..bf5b403c8e 100644 --- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/ZipExtractor.java +++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/ZipExtractor.java @@ -291,7 +291,7 @@ private void copyZipEntry(ZipEntry entry, File destination, if (entry.isDirectory()) { - String perm = getDirectoryFileSystemPermissions(destination); + String perm = getDirectoryFileSystemPermissions(); addPermission(destination, permissions, perm); if (!Utils.createDirectory(destination)) { @@ -331,10 +331,9 @@ private String getProtectedDirectoryPermissionUnix() /** * Returns the file system permissions for a directory. - * @param path the directory for which we want the file permissions. * @return the file system permissions for the directory. */ - private String getDirectoryFileSystemPermissions(File path) + private String getDirectoryFileSystemPermissions() { // TODO We should get this dynamically during build? return "755"; diff --git a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumAuthMethod.java b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumAuthMethod.java index c945c92fef..0b18e45f4e 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumAuthMethod.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumAuthMethod.java @@ -13,24 +13,18 @@ * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2015-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC. */ package org.opends.server.authorization.dseecompat; /** This class provides an enumeration of the allowed authmethod types. */ enum EnumAuthMethod { /** The enumeration type when the bind rule has specified authentication of none. */ - AUTHMETHOD_NONE ("none"), + AUTHMETHOD_NONE, /** The enumeration type when the bind rule has specified authentication of simple. */ - AUTHMETHOD_SIMPLE ("simple"), + AUTHMETHOD_SIMPLE, /** The enumeration type when the bind rule has specified authentication of ssl client auth. */ - AUTHMETHOD_SSL ("ssl"), + AUTHMETHOD_SSL, /** The enumeration type when the bind rule has specified authentication of a sasl mechanism. */ - AUTHMETHOD_SASL ("sasl"); - - /** - * Creates a new enumeration type for this authmethod. - * @param authmethod The authemethod name. - */ - EnumAuthMethod (String authmethod){ - } + AUTHMETHOD_SASL; } diff --git a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalReason.java b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalReason.java index b1c111c544..c1bb1f4125 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalReason.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalReason.java @@ -12,6 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2008 Sun Microsystems, Inc. + * Portions Copyright 2026 3A Systems, LLC. */ package org.opends.server.authorization.dseecompat; @@ -28,36 +29,30 @@ public enum EnumEvalReason { /** * There are aren't any allow ACIs. */ - NO_ALLOW_ACIS(0), + NO_ALLOW_ACIS, /** * An deny ACI either evaluated to FAIL or to TRUE. */ - EVALUATED_DENY_ACI(1), + EVALUATED_DENY_ACI, /** * An allow evaluated to true. */ - EVALUATED_ALLOW_ACI(2), + EVALUATED_ALLOW_ACI, /** * None of the allow and deny ACIs evaluated to true. */ - NO_MATCHED_ALLOWS_ACIS(3), + NO_MATCHED_ALLOWS_ACIS, /** * No specific reason could be determined. */ - NO_REASON(4), + NO_REASON, /** * The authorization DN has bypass-acl privileges. */ - SKIP_ACI(5); - - /** - * Create a new enumeration type for the specified result value. - * @param v The value of the result. - */ - EnumEvalReason(int v) {} + SKIP_ACI; } diff --git a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalResult.java b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalResult.java index 05329b55fd..985f783eb7 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalResult.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumEvalResult.java @@ -26,30 +26,22 @@ public enum EnumEvalResult { /** * This enumeration is returned when the result of the evaluation is TRUE. */ - TRUE(0), + TRUE, /** * This enumeration is returned when the result of the evaluation is FALSE. */ - FALSE(1), + FALSE, /** * This enumeration is returned when the result of the evaluation is FAIL. * This should only be returned when a system failure occurred. */ - FAIL(2), + FAIL, /** * This is an internal enumeration used during evaluation of bind rule when * internal processing of the evaluation is undefined. It is never returned * back as a result of the evaluation. */ - ERR(3); - - /** - * Create a new enumeration type for the specified result value. - * @param v The value of the result. - */ - EnumEvalResult(int v) { - } - + ERR; /** * The method tries to determine if the result was undefined, and if so * it returns an FAIL enumeration. If the result was not undefined (the diff --git a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumUserDNType.java b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumUserDNType.java index 2d56b53c0f..88587d34b8 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumUserDNType.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/EnumUserDNType.java @@ -13,6 +13,7 @@ * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC. */ package org.opends.server.authorization.dseecompat; @@ -33,26 +34,20 @@ enum EnumUserDNType { * The enumeration type when the "userdn" URL contains only a DN (no * filter or scope) and that DN has no pattern. */ - DN(0), + DN, /** * The enumeration type when the "userdn" URL contains only a DN (no * filter or scope) and that DN has a substring pattern. */ - DNPATTERN(1), + DNPATTERN, /** The enumeration type when the "userdn" URL has the value of: "ldap:///all". */ - ALL(2), + ALL, /** The enumeration type when the "userdn" URL has the value of: "ldap:///parent". */ - PARENT(3), + PARENT, /** The enumeration type when the "userdn" URL has the value of: "ldap:///self". */ - SELF(4), + SELF, /** The enumeration type when the "userdn" URL has the value of: "ldap:///anyone". */ - ANYONE(5), + ANYONE, /** The enumeration type when the "userdn" URL is contains a DN (suffix), a scope and a filter. */ - URL(6); - - /** - * Constructor taking an integer value. - * @param v Integer value. - */ - EnumUserDNType(int v) {} + URL; } diff --git a/opendj-server-legacy/src/main/java/org/opends/server/loggers/CommonAudit.java b/opendj-server-legacy/src/main/java/org/opends/server/loggers/CommonAudit.java index 3a5c95ce37..149350224f 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/loggers/CommonAudit.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/loggers/CommonAudit.java @@ -519,7 +519,6 @@ private void addJsonHandler(PublisherConfig publisher, AuditServiceBuilder build jsonConfig.setLogDirectory(logDirectory.getAbsolutePath()); jsonConfig.setName(publisher.getName()); jsonConfig.setTopics(Collections.singleton(publisher.getCommonAuditTopic())); - addJsonHandlerBufferingConfig(config, jsonConfig); addHandlerRetentionConfig(publisher, config, jsonConfig); addHandlerRotationConfig(publisher, config, jsonConfig); @@ -531,12 +530,6 @@ private void addJsonHandler(PublisherConfig publisher, AuditServiceBuilder build } } - private void addJsonHandlerBufferingConfig(JsonConfigData config, JsonAuditEventHandlerConfiguration auditConfig) - { - JsonAuditEventHandlerConfiguration.EventBufferingConfiguration jsonBufferingConfig = - new JsonAuditEventHandlerConfiguration.EventBufferingConfiguration(); - } - private void addHandlerRotationConfig(PublisherConfig publisher, HandlerConfigData config, FileBasedEventHandlerConfiguration auditConfig) throws ConfigException { diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java index 6fe8aae5e3..7a9b272c9f 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java @@ -1022,7 +1022,7 @@ private void updateTrustManager() throws ConfigureDSException } if (StaticUtils.isFips()) { - putAdminTrustManagerConfigAttribute(trustManagerProviderDN, DN_ADMIN_TRUST_MANAGER); + putAdminTrustManagerConfigAttribute(DN_ADMIN_TRUST_MANAGER); } } @@ -1045,7 +1045,7 @@ private void putTrustManagerAttribute(final Argument arg, final String attribute } } - private void putAdminTrustManagerConfigAttribute(final Argument trustManagerProviderDN, final String attributeDN) + private void putAdminTrustManagerConfigAttribute(final String attributeDN) throws ConfigureDSException { if (keyManagerProviderDN.isPresent()) diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java index a9704c2809..d00be4cd66 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java @@ -393,7 +393,7 @@ public String doSASLBind(ByteSequence bindDN, ByteSequence bindPassword, case SASL_MECHANISM_EXTERNAL: return doSASLExternal(bindDN, saslProperties, requestControls, responseControls); case SASL_MECHANISM_GSSAPI: - return doSASLGSSAPI(bindDN, bindPassword, saslProperties, requestControls, responseControls); + return doSASLGSSAPI(bindDN, bindPassword, saslProperties); case SASL_MECHANISM_PLAIN: return doSASLPlain(bindDN, bindPassword, saslProperties, requestControls, responseControls); default: @@ -1747,10 +1747,6 @@ private static LinkedHashMap getSASLExternalProperti * to process the SASL bind. SASL EXTERNAL does not * take any properties, so this should be empty or * null. - * @param requestControls The set of controls to include the request to the - * server. - * @param responseControls A list to hold the set of controls included in - * the response from the server. * * @return A message providing additional information about the bind if * appropriate, or null if there is no special @@ -1764,9 +1760,7 @@ private static LinkedHashMap getSASLExternalProperti */ private String doSASLGSSAPI(ByteSequence bindDN, ByteSequence bindPassword, - Map> saslProperties, - List requestControls, - List responseControls) + Map> saslProperties) throws ClientException, LDAPException { String kdc = null; diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/StopDS.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/StopDS.java index 01095eaacd..0e3552b8d5 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/tools/StopDS.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/StopDS.java @@ -13,6 +13,7 @@ * * Copyright 2006-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC. */ package org.opends.server.tools; @@ -371,7 +372,7 @@ public static int stopDS(String[] args, OutputStream outStream, if (checkStoppability.isPresent()) { - System.exit(checkStoppability(argParser, out, err)); + System.exit(checkStoppability(argParser, out)); } // If both a bind password and bind password file were provided, then return @@ -640,12 +641,10 @@ public static int stopDS(String[] args, OutputStream outStream, * on the different parameters passed. * @param argParser the ArgumentParser with the arguments already parsed. * @param out the print stream to use for standard output. - * @param err the print stream to use for standard error. * @return the error code that we return when we are checking the stoppability * of the server. */ - private static int checkStoppability(ArgumentParser argParser, - PrintStream out, PrintStream err) + private static int checkStoppability(ArgumentParser argParser, PrintStream out) { int returnValue; boolean isServerRunning; diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeCli.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeCli.java index d6e86d8286..346c9c9d2b 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeCli.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeCli.java @@ -12,6 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Portions Copyright 2013-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC. */ package org.opends.server.tools.upgrade; @@ -24,7 +25,6 @@ import static org.opends.server.tools.upgrade.Upgrade.*; import java.io.IOException; -import java.io.InputStream; import java.io.OutputStream; import java.io.PrintStream; import java.util.ArrayList; @@ -79,7 +79,7 @@ public final class UpgradeCli extends ConsoleApplication implements /** Flag indicating whether the global arguments have already been initialized. */ private boolean globalArgumentsInitialized; - private UpgradeCli(InputStream in, OutputStream out, OutputStream err) + private UpgradeCli(OutputStream out, OutputStream err) { super(new PrintStream(out), new PrintStream(err)); this.parser = @@ -124,7 +124,7 @@ public static void main(String[] args) public static int main(String[] args, boolean initializeServer, OutputStream outStream, OutputStream errStream) { - final UpgradeCli app = new UpgradeCli(System.in, outStream, errStream); + final UpgradeCli app = new UpgradeCli(outStream, errStream); // Run the application. return app.run(args, initializeServer); diff --git a/opendj-server-legacy/src/main/java/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java b/opendj-server-legacy/src/main/java/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java index 35cd4ae2bb..f3a968c54b 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java @@ -1112,7 +1112,14 @@ private void addArgToCommandBuilder(final Argument arg, final String value, fina { arg.clearValues(); arg.addValue(value); - commandBuilder.addArgument(arg); + if (obfuscated) + { + commandBuilder.addObfuscatedArgument(arg); + } + else + { + commandBuilder.addArgument(arg); + } } }