frankvicky commented on code in PR #17426:
URL: https://github.com/apache/kafka/pull/17426#discussion_r1793051797
##########
storage/src/test/java/org/apache/kafka/server/log/remote/storage/LocalTieredStorage.java:
##########
@@ -254,9 +255,10 @@ public void configure(Map<String, ?> configs) {
if (transfererClass != null) {
try {
- transferer = (Transferer)
getClass().getClassLoader().loadClass(transfererClass).newInstance();
-
- } catch (InstantiationException | IllegalAccessException |
ClassNotFoundException | ClassCastException e) {
+ transferer = (Transferer)
getClass().getClassLoader().loadClass(transfererClass)
+ .getDeclaredConstructor().newInstance();
Review Comment:
`clazz.newInstance()` has been deprecated since Java 9.
The documentation recommends using
`clazz.getDeclaredConstructor().newInstance()` instead.”
##########
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/OAuthBearerSaslClientProvider.java:
##########
@@ -27,7 +27,7 @@ public class OAuthBearerSaslClientProvider extends Provider {
@SuppressWarnings("this-escape")
protected OAuthBearerSaslClientProvider() {
- super("SASL/OAUTHBEARER Client Provider", 1.0, "SASL/OAUTHBEARER
Client Provider for Kafka");
+ super("SASL/OAUTHBEARER Client Provider", "1.0", "SASL/OAUTHBEARER
Client Provider for Kafka");
put("SaslClientFactory." +
OAuthBearerLoginModule.OAUTHBEARER_MECHANISM,
Review Comment:
`new Provider(String, double, String)` has been deprecated since Java 9.
The documentation recommends using `new Provider(String, String, String)`
instead.
--
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]