Skip to content
Open
Show file tree
Hide file tree
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 @@ -1405,7 +1405,7 @@ public Promise<ActionResponse, ResourceException> actionInstance(Context context
scriptBindings.put("object", currentResource.getContent());
Object result = execCustomAction(managedContext, request.getAction(), value, scriptBindings);

logger.debug("Result returned by executing the script: ", result);
logger.debug("Result returned by executing the script: {}", result);

// re-read the object for the response using the appropriate connection given our calling context
final Connection connection = ContextUtil.isExternal(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
 * information: "Portions copyright [year] [name of copyright owner]".
 *
 * Copyright 2015-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
 */
package org.forgerock.openidm.managed;

Expand Down Expand Up @@ -225,7 +226,7 @@
final String vertex1FieldName = relationshipPropertyName;
final String vertex2Id = relationshipField.get(REFERENCE_ID).asString();
final String vertex2FieldName = relationshipReversePropertyName;
logger.debug("Going to query for relationship-defining edge between vertices <{0},{1}> and <{2},{3}>."
logger.debug("Going to query for relationship-defining edge between vertices <{},{}> and <{},{}>."
, vertex1Id, vertex1FieldName, vertex2Id, vertex2FieldName);
final QueryRequest edgeQueryRequest = Requests.newQueryRequest(REPO_RESOURCE_PATH)
.setQueryId(EDGE_QUERY_ID)
Expand Down Expand Up @@ -281,7 +282,7 @@
try {
final Connection connection = getRelationshipProvider().getConnection();
if (connection instanceof Describable) {
final ApiDescription description = ((Describable<ApiDescription, Request>) connection).handleApiRequest(

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (ubuntu-latest, 21)

[unchecked] unchecked cast

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (windows-latest, 17)

[unchecked] unchecked cast

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (windows-latest, 26)

[unchecked] unchecked cast

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (macos-latest, 26)

[unchecked] unchecked cast

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (macos-latest, 17)

[unchecked] unchecked cast

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (ubuntu-latest, 17)

[unchecked] unchecked cast

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (ubuntu-latest, 26)

[unchecked] unchecked cast

Check warning on line 285 in openidm-core/src/main/java/org/forgerock/openidm/managed/ReverseRelationshipValidator.java

View workflow job for this annotation

GitHub Actions / build-maven (ubuntu-latest, 25)

[unchecked] unchecked cast
context, Requests.newApiRequest(getRelationshipRefResourcePath(relationshipRef)));
return ReverseReferenceType.parseReverseReferenceType(parsePropertiesFromAPIDescription(description),
relationshipReversePropertyName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class DatabaseInfoResourceProvider extends AbstractInfoResourceProvider {
@Override
public Promise<ResourceResponse, ResourceException> readInstance(Context context, ReadRequest request) {

Boolean enabled = Boolean.parseBoolean(
boolean enabled = Boolean.parseBoolean(
IdentityServer.getInstance().getProperty("openidm.bonecp.statistics.enabled", "false"));
if (!enabled) {
return new ServiceUnavailableException("BoneCP statistics mbean not enabled").asPromise();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015-2016 ForgeRock AS.
* Portions Copyrighted 2024 3A Systems LLC.
* Portions Copyrighted 2024-2026 3A Systems LLC.
*/
package org.forgerock.openidm.maintenance.upgrade;

Expand Down Expand Up @@ -191,7 +191,7 @@ void activate(ComponentContext compContext) throws Exception {
this.osgiFrameworkService = serviceTracker.getService();

if (osgiFrameworkService != null) {
logger.debug("Obtained OSGiFrameworkService", compContext.getProperties());
logger.debug("Obtained OSGiFrameworkService with properties {}", compContext.getProperties());
} else {
throw new InternalServerErrorException("Cannot instantiate service without OSGiFrameworkService");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2016 ForgeRock AS.
* Portions Copyrighted 2024 3A Systems LLC.
* Portions Copyrighted 2024-2026 3A Systems LLC.
*/
package org.forgerock.openidm.messaging;

Expand Down Expand Up @@ -240,7 +240,7 @@ public void deactivate(ComponentContext context) {
subscriber.unsubscribe();
logger.debug("MessageSubscriber {} has unsubscribed.", subscriber.getName());
} catch (Exception e) {
logger.warn("Failure to unsubscribe MessageSubscriber {}.", subscriber.getName(), subscriber, e);
logger.warn("Failure to unsubscribe MessageSubscriber {}.", subscriber.getName(), e);
}
}
subscribers.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,8 @@ public static <T> T coercedTypeCasting(Object source, Class<T> clazz) throws Ill
}
} else if ((targetClazz.equals(Character.class)) || (targetClazz.equals(char.class))) {
if (sourceClass == String.class) {
Character v = ((String) source).charAt(0);
result = (T) v;
char v = ((String) source).charAt(0);
result = (T) Character.valueOf(v);
coerced = true;
}
} else if (targetClazz.equals(Character[].class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2012-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/
package org.forgerock.openidm.quartz.impl;

Expand Down Expand Up @@ -1181,10 +1182,10 @@ public void resumeTriggerGroup(SchedulingContext context, String groupName)
resumeTrigger(context, triggerName, groupName);
}
} catch (JsonValueException e) {
logger.warn("Error pausing trigger group", groupName, e);
logger.warn("Error pausing trigger group {}", groupName, e);
throw new JobPersistenceException("Error deserializing trigger", e);
} catch (Exception e) {
logger.warn("Error pausing trigger group", groupName, e);
logger.warn("Error pausing trigger group {}", groupName, e);
throw new JobPersistenceException("Error pausing trigger group", e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
* Portions Copyright 2026 3A Systems, LLC.
*/
package org.forgerock.openidm.repo.jdbc.impl;

Expand All @@ -46,28 +47,28 @@ public class Activator implements BundleActivator {
final static Logger logger = LoggerFactory.getLogger(Activator.class);

public void start(BundleContext context) {
logger.debug("JDBC bundle starting", context);
logger.debug("JDBC bundle starting");

JsonValue repoConfig = ConfigBootstrapHelper.getRepoBootConfig("jdbc", context);
if (repoConfig == null) {
logger.debug("No JDBC configuration detected");
logger.debug("JDBC bundle started", context);
logger.debug("JDBC bundle started");
return;
}
String dataSourcePid = repoConfig.get(JDBCRepoService.CONFIG_USE_DATASOURCE).asString();
if (dataSourcePid == null) {
logger.error("JDBC repository configured, but does not specify a datasource to use - "
+ "the \"" + JDBCRepoService.CONFIG_USE_DATASOURCE + "\" config property is required "
+ "and must be the <name> of a datasource.jdbc-<name>.json configuration.");
logger.debug("JDBC bundle started", context);
logger.debug("JDBC bundle started");
return;
}

JsonValue dataSourceConfig = ConfigBootstrapHelper.getDataSourceBootConfig("jdbc-" + dataSourcePid, context);
if (dataSourceConfig == null) {
logger.error("JDBC repository configured, but datasource \"" + dataSourcePid + "\" was not found - "
+ " must specify or configure a valid datasource for JDBC repository to use.");
logger.debug("JDBC bundle started", context);
logger.debug("JDBC bundle started");
return;
}

Expand All @@ -90,7 +91,7 @@ public void start(BundleContext context) {

context.registerService(RepoBootService.class.getName(), bootSvc, prop);
logger.info("Registered bootstrap repository service");
logger.debug("JDBC bundle started", context);
logger.debug("JDBC bundle started");
}

/**
Expand Down Expand Up @@ -120,6 +121,6 @@ private String getDbDirname(JsonValue repoConfig) {
}

public void stop(BundleContext context) {
logger.debug("JDBC bundle stopped", context);
logger.debug("JDBC bundle stopped");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public void create(String fullId, String type, String localId, Map<String, Objec
*/
void writeValueProperties(String fullId, long dbId, String localId, JsonValue value, Connection connection) throws SQLException {
if (cfg.hasPossibleSearchableProperties()) {
Integer batchingCount = 0;
int batchingCount = 0;
PreparedStatement propCreateStatement = getPreparedStatement(connection, QueryDefinition.PROPCREATEQUERYSTR);
try {
batchingCount = writeValueProperties(fullId, dbId, localId, value, connection, propCreateStatement, batchingCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/

package org.forgerock.openidm.repo.jdbc.impl.query;
Expand Down Expand Up @@ -535,7 +536,7 @@
}
if (PREFIX_INT.equals(tokenParts[0])) {
// handle single integer value
Integer int_value = Integer.parseInt(objValue.toString());
int int_value = Integer.parseInt(objValue.toString());
statement.setInt(count, int_value);
count++;
} else if (PREFIX_LIST.equals(tokenParts[0])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014-2016 ForgeRock AS.
* Portions Copyrighted 2024 3A Systems LLC.
* Portions Copyrighted 2024-2026 3A Systems LLC.
*/

package org.forgerock.openidm.router.impl;
Expand Down Expand Up @@ -242,7 +242,7 @@ public boolean matches(final Context context, final Request request) {
script.put("context", context);
return (Boolean) script.eval();
} catch (ScriptException e) {
logger.warn("Failed to evaluate filter condition: ", e.getMessage(), e);
logger.warn("Failed to evaluate filter condition: {}", e.getMessage(), e);
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public Void call(Parameter scope, Function<?> callback, Object... arguments)
result.get(QueryResponse.FIELD_TOTAL_PAGED_RESULTS_POLICY).as(enumConstant(CountPolicy.class)),
result.get(QueryResponse.FIELD_TOTAL_PAGED_RESULTS).asInteger());
} else {
logger.debug("Script returned unexpected query result structure: ",
logger.debug("Script returned unexpected query result structure: {}",
result.getObject());
return new InternalServerErrorException(
"Script returned unexpected query result structure of type "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ protected List<Method> getAllMethodsByName(String name) {

Collections.sort(allNamedMethods, new Comparator<Method>() {
public int compare(Method o1, Method o2) {
Integer l1 = o1.getParameterTypes().length;
Integer l2 = o2.getParameterTypes().length;
return l1.compareTo(l2);
int l1 = o1.getParameterTypes().length;
int l2 = o2.getParameterTypes().length;
return Integer.compare(l1, l2);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*
* Copyright 2006-2008 Sun Microsystems, Inc.
* Portions Copyright 2010-2015 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/
package org.forgerock.openidm.crypto;

Expand Down Expand Up @@ -133,15 +134,15 @@ public boolean fieldMatches(String plaintextfield, String storedField) {

saltLength = decodedBytes.length - digestSize;
if (saltLength <= 0) {
logger.error("Invalid decoded stored field", storedField);
logger.error("Invalid decoded stored field: unexpected length");
return false;
}
saltBytes = new byte[saltLength];
System.arraycopy(decodedBytes, 0, digestBytes, 0, digestSize);
System.arraycopy(decodedBytes, digestSize, saltBytes, 0, saltLength);
} catch (Exception e) {
// May catch NPE if Base64.decode returns null on bad (non-base64) input
logger.error("Cannot decode stored field", storedField, e);
logger.error("Cannot decode stored field", e);
return false;
}

Expand All @@ -158,7 +159,7 @@ public boolean fieldMatches(String plaintextfield, String storedField) {
try {
userDigestBytes = messageDigest.digest(plainPlusSalt);
} catch (Exception e) {
logger.error("Cannot encode field", storedField, e);
logger.error("Cannot encode field", e);
return false;
} finally {
Arrays.fill(plainPlusSalt, (byte) 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Portions copyright 2011-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/

package org.forgerock.openidm.util;
Expand Down Expand Up @@ -90,9 +91,9 @@ public static int compareJsonObjectValues(final Object left, final Object right)
final String s2 = (String) right;
return s1.compareToIgnoreCase(s2);
} else if (left instanceof Number && right instanceof Number) {
final Double n1 = ((Number) left).doubleValue();
final Double n2 = ((Number) right).doubleValue();
return n1.compareTo(n2);
final double n1 = ((Number) left).doubleValue();
final double n2 = ((Number) right).doubleValue();
return Double.compare(n1, n2);
} else if (left instanceof Boolean && right instanceof Boolean) {
final Boolean b1 = (Boolean) left;
final Boolean b2 = (Boolean) right;
Expand Down
Loading