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: [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]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists