frankvicky commented on code in PR #17426:
URL: https://github.com/apache/kafka/pull/17426#discussion_r1793053700


##########
trogdor/src/test/java/org/apache/kafka/trogdor/common/JsonSerializationTest.java:
##########
@@ -74,7 +74,7 @@ private <T> void verify(T val1) throws Exception {
         Class<T> clazz = (Class<T>) val1.getClass();
         T val2 = JsonUtil.JSON_SERDE.readValue(bytes, clazz);
         for (Field field : clazz.getDeclaredFields()) {
-            boolean wasAccessible = field.isAccessible();
+            boolean wasAccessible = field.canAccess(val2);

Review Comment:
   `.isAccessible()` has been deprecated since Java 9.
   The documentation recommends using `.canAccess(object)` 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]

Reply via email to