You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mrserb (via GitHub)" <gi...@apache.org> on 2023/05/26 01:46:23 UTC

[GitHub] [netbeans] mrserb commented on issue #5774: Not honoring containerDelegate in BeanInfo

mrserb commented on issue #5774:
URL: https://github.com/apache/netbeans/issues/5774#issuecomment-1563705846

   The order of methods returned by the "ClassInfo" should not affect the selection of "read" and "write" methods. It is just a "stable" wrapper over "Class.getMethods()" since the returned order is not specified and is random for that method.
   The next code shows the correct read/write methods for the JPanel class on JDK18 and JDK 19.
   ```
           BeanInfo beanInfo = Introspector.getBeanInfo(JPanel.class);
           PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
           for (PropertyDescriptor pd : propertyDescriptors) {
               Class<?> propertyType = pd.getPropertyType();
               if(propertyType!=null && propertyType.toString().contains("UI")){
                   System.out.println("pd = " + pd);
               }
           }
   ```
   readMethod=public javax.swing.plaf.PanelUI javax.swing.JPanel.getUI();
   writeMethod=public void javax.swing.JPanel.setUI(javax.swing.plaf.PanelUI)


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists