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 @@ -821,8 +821,6 @@ public static void setSQLParam(final PreparedStatement stmt, final int idx, SQLP
stmt.setLong(idx, ((BigInteger) val).longValue());
} else if (val instanceof Byte) {
stmt.setByte(idx, (Byte) val);
} else if (val instanceof Integer) {
stmt.setInt(idx, (Integer) val);
} else if (val instanceof InputStream) {
stmt.setBinaryStream(idx, (InputStream) val, 10000);
} else if (val instanceof Blob) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@
return logger;
}

private GroovyScriptEngine groovyScriptEngine = null;
private volatile GroovyScriptEngine groovyScriptEngine = null;

protected GroovyScriptEngine getGroovyScriptEngine() {
if (null == groovyScriptEngine) {
Expand All @@ -794,8 +794,8 @@
final GroovyClassLoader loader =
new GroovyClassLoader(getParentLoader(), compilerConfiguration, true);

groovyScriptEngine =
new GroovyScriptEngine(getRoots(compilerConfiguration, loader), loader);

Check warning

Code scanning / CodeQL

Race condition in double-checked locking object initialization Warning

Potential race condition. This assignment to
groovyScriptEngine
is visible to other threads before the subsequent statements are executed.

initializeCustomizer();
}
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 Copyrighted 2026 3A Systems, LLC
*/

package org.identityconnectors.contract.test;
Expand All @@ -32,8 +33,6 @@

import org.identityconnectors.common.StringUtil;
import org.identityconnectors.contract.data.DataProvider;
import org.identityconnectors.framework.api.ConnectorFacade;
import org.identityconnectors.framework.common.objects.Schema;
import org.testng.IObjectFactory;
import org.testng.ITestContext;
import org.testng.annotations.Factory;
Expand Down Expand Up @@ -70,7 +69,7 @@ public Object[] createInstances(ITestContext context) {

Injector injector = getInjector(context);
List<Object> result = new ArrayList<Object>();
IObjectFactory objectFactory = null;
IObjectFactory objectFactory = new ObjectFactoryImpl();

for (Class<?> testClass: getContractTestClasses(context)) {
Constructor constructor = null;
Expand Down Expand Up @@ -111,14 +110,4 @@ public Injector getInjector(ITestContext context) {
public DataProvider getDataProvider(ITestContext context) {
return ConnectorHelper.createDataProvider();
}

private static class ContractTestFactory {

private ConnectorFacade connectorFacade = null;

private Schema schema = null;

private IObjectFactory objectFactory = new ObjectFactoryImpl();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class WebSocketConnectionGroup

private Encryptor encryptor = null;

private RemoteOperationContext operationContext = null;
private volatile RemoteOperationContext operationContext = null;

private final AtomicBoolean isRunning = new AtomicBoolean(Boolean.TRUE);
private final Set<String> principals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* "Portions Copyrighted [year] [name of copyright owner]"
* ====================
* Portions Copyrighted 2010-2016 ForgeRock AS.
* Portions Copyrighted 2026 3A Systems, LLC
*/
package org.identityconnectors.framework.common;

Expand Down Expand Up @@ -485,14 +486,14 @@ public static Uid getUidIfGetOperation(Filter filter) {
*
* @return the framework version; never null.
*/
public static Version getFrameworkVersion() {
public static synchronized Version getFrameworkVersion() {
if (frameworkVersion == null) {
frameworkVersion = Version.create(1, 5);
}
return frameworkVersion;
}

static Version getFrameworkVersion(ClassLoader loader) throws IOException {
static Version readFrameworkVersion(ClassLoader loader) throws IOException {
InputStream stream = loader.getResourceAsStream("connectors-framework.properties");
try {
Properties props = new Properties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
* ====================
* Portions Copyrighted 2026 3A Systems, LLC
*/
package org.identityconnectors.framework.common;

Expand All @@ -41,13 +42,13 @@ public class FrameworkUtilTests {
@Test
public void testFrameworkVersion() throws Exception {
ClassLoader loader = new VersionClassLoader(this.getClass().getClassLoader(), "1.2.3-alpha");
assertEquals(FrameworkUtil.getFrameworkVersion(loader), Version.parse("1.2.3"));
assertEquals(FrameworkUtil.readFrameworkVersion(loader), Version.parse("1.2.3"));
}

@Test
public void testFrameworkVersionCannotBeBlank() throws Exception {
try {
FrameworkUtil.getFrameworkVersion(new VersionClassLoader(this.getClass().getClassLoader(), " "));
FrameworkUtil.readFrameworkVersion(new VersionClassLoader(this.getClass().getClassLoader(), " "));
Assert.fail();
} catch (IllegalStateException e) {
// OK.
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 Copyrighted 2026 3A Systems, LLC
*/
package org.identityconnectors.testconnector;

Expand Down Expand Up @@ -61,7 +62,7 @@ public CachedBatchResult(Boolean complete, Boolean error, String resultId, Objec
private final Map<String,List<BatchTask>> tasks = new HashMap<String, List<BatchTask>>();
private final Map<String,List<CachedBatchResult>> results = new HashMap<String, List<CachedBatchResult>>();
private final Map<String, Boolean> complete = new HashMap<String, Boolean>();
private final String resultLock = "resultLock";
private final Object resultLock = new Object();

public static void addTasks(String token, List<BatchTask> tasklist) {
singleton.tasks.put(token, new ArrayList<BatchTask>(tasklist));
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 Copyrighted 2026 3A Systems, LLC
*/

package org.identityconnectors.testconnector;
Expand Down Expand Up @@ -122,7 +123,7 @@ public void setRandomString(String randomString) {

private UUID guid;

private ScheduledExecutorService executorService = null;
private volatile ScheduledExecutorService executorService = null;

public synchronized UUID getGuid() {
if (null == guid) {
Expand Down
Loading