melloware commented on code in PR #711:
URL: https://github.com/apache/myfaces/pull/711#discussion_r1595338968


##########
impl/src/main/java/org/apache/myfaces/push/Json.java:
##########
@@ -111,12 +112,45 @@ else if (object instanceof Class<?>)
         {
             encode(((Class<?>) object).getName(), builder);
         }
+        else if (object instanceof Record)
+        {
+            encodeRecord(object, builder);
+        }
         else
         {
             encodeBean(object, builder);
         }
     }
 
+    private static void encodeRecord(Object recordObject, StringBuilder 
builder) {
+
+        builder.append('{');
+        boolean fieldsFound = false;
+
+        for (Field field : recordObject.getClass().getDeclaredFields())
+        {
+            field.setAccessible(true);

Review Comment:
   I could be wrong but is this the kind of thing they are removing in JDK 21? 
Being able to change field access?  I don't follow those JDK reflection updates 
much but i thought they were removing a lot of things?



-- 
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: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to