You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2024/10/10 03:34:46 UTC

[PR] Primitive wrapper property editors should use valueOf [netbeans]

mbien opened a new pull request, #7864:
URL: https://github.com/apache/netbeans/pull/7864

    - the wrapper class constructors are all deprecated for removal -> lets use `valueOf`
    - this will also allow setting wrapper properties to null. The only exception is Character, since CharEditor (for primitives) maps null to a char before it is passed to the CharacterEditor which never sees null.
    - affects code generation in GUI forms
   
   fixes https://github.com/apache/netbeans/issues/7049
   
   test:
   1) 
   ```java
   public class TextField extends JTextField {
       
       private Long valLong = 123L;
       private Double valDouble = 123.0;
       private Float valFloat = 123.0f;
       private Integer valInteger = 123;
       private Character valCharacter = 'a';
       private Short valShort = 123;
       private Byte valByte = 123;
       private Boolean valBoolean = true;
       
       private long primLong = 123;
       private int primInt = 123;
       
       // generate getter/setters
   }
   ```
   2) create JPanel form and drag TextField into form via design view.
   3) click on the component in design view, edit the properties via Properties window, check generated code


-- 
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


Re: [PR] Primitive wrapper property editors should use valueOf [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #7864:
URL: https://github.com/apache/netbeans/pull/7864


-- 
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


Re: [PR] Primitive wrapper property editors should use valueOf [netbeans]

Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni commented on PR #7864:
URL: https://github.com/apache/netbeans/pull/7864#issuecomment-2422386992

   this is for NB 24 ?


-- 
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