From 2d3d7788f45a1867f5d47d60fb5a69d042b05f2d Mon Sep 17 00:00:00 2001 From: Stefan Miklosovic Date: Tue, 18 Mar 2025 11:58:16 +0100 Subject: [PATCH] Fix failing simulator dtests after CASSANDRA-20368 patch by Stefan Miklosovic; reviewed by David Capwell for CASSANDRA-20450 --- src/java/org/apache/cassandra/auth/AuthConfig.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/cassandra/auth/AuthConfig.java b/src/java/org/apache/cassandra/auth/AuthConfig.java index 1363b24a6f..67d4490790 100644 --- a/src/java/org/apache/cassandra/auth/AuthConfig.java +++ b/src/java/org/apache/cassandra/auth/AuthConfig.java @@ -135,6 +135,15 @@ public final class AuthConfig return ParameterizedClass.newInstance(authCls, List.of("", authPackage)); } - return ParameterizedClass.newInstance(new ParameterizedClass(defaultCls.getName()), List.of()); + // for now, this has to stay and can not be replaced by ParameterizedClass.newInstance as above + // due to that failing for simulator dtests. See CASSANDRA-20450 for more information. + try + { + return defaultCls.newInstance(); + } + catch (InstantiationException | IllegalAccessException e) + { + throw new ConfigurationException("Failed to instantiate " + defaultCls.getName(), e); + } } }