smiklosovic commented on code in PR #4943:
URL: https://github.com/apache/cassandra/pull/4943#discussion_r3594793402
##########
src/java/org/apache/cassandra/db/marshal/TypeParser.java:
##########
@@ -491,6 +489,19 @@ private static AbstractType<?> getAbstractType(String
compareWith, TypeParser pa
}
}
+ private static Class<? extends AbstractType<?>>
getAbstractTypeClass(String compareWith) throws ConfigurationException
+ {
+ String className = compareWith.contains(".") ? compareWith :
"org.apache.cassandra.db.marshal." + compareWith;
+ // Defer class initialization until after confirming this is an
AbstractType. The static instance field
+ // access or getInstance(TypeParser) invocation below performs the
initialization for valid types.
+ @SuppressWarnings("unchecked")
+ Class<? extends AbstractType<?>> typeClass =
+ (Class<? extends AbstractType<?>>)(Class<?>)
FBUtilities.classForNameWithoutInitialization(className,
Review Comment:
two casts?
`(Class<? extends AbstractType<?>>)(Class<?>)`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]