You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/02/20 05:14:17 UTC

[GitHub] [netbeans] BradWalker opened a new pull request #3647: update VariableMirrorTranslator to bring it up to standards

BradWalker opened a new pull request #3647:
URL: https://github.com/apache/netbeans/pull/3647


   I initially started cleaning up VariableMirrorTranslator.java as part of
   mass deprecation cleanup work I am doing.
   
   The changes for handling the autobox/unbox of the floating-point class turned
   into a general cleanup.
   
   - updated autobox/unbox
   - using multi-catch now
   - using strings in switch
   - update a couple of places should be using diamond operator
   
   
   
   
   
   ---
   **^Add meaningful description above**
   
   By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
   
    - are all your own work, and you have the right to contribute them.
    - are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).
   
   Please make sure (eg. `git log`) that all commits have a valid name and email address for you in the Author field.
   
   If you're a first time contributor, see the Contributing guidelines for more information.
   
   


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


[GitHub] [netbeans] mbien commented on a change in pull request #3647: update VariableMirrorTranslator to bring it up to standards

Posted by GitBox <gi...@apache.org>.
mbien commented on a change in pull request #3647:
URL: https://github.com/apache/netbeans/pull/3647#discussion_r810572805



##########
File path: java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java
##########
@@ -156,17 +156,7 @@ private static Object createPristineInstanceOf(Class clazz) {
             Object newInstance = constructor.newInstance();
             return newInstance;
             
-        } catch (InstantiationException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (IllegalAccessException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (IllegalArgumentException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (InvocationTargetException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (NoSuchMethodException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (SecurityException ex) {
+        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {

Review comment:
       could be further collapsed to `(ReflectiveOperationException | rest...)` since ReflectiveOperationException is the supertype of most reflection related exceptions.




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


[GitHub] [netbeans] BradWalker commented on pull request #3647: update VariableMirrorTranslator to bring it up to standards

Posted by GitBox <gi...@apache.org>.
BradWalker commented on pull request #3647:
URL: https://github.com/apache/netbeans/pull/3647#issuecomment-1046174776


   > btw Brad, I have two PRs in queue which do some cleanup too. One is touching java/maven.indexer the other java/java.hints.declarative, just mentioning it to avoid conflicts.
   
   No problem.. I'll just follow your lead.. Thanks for the heads up..


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


[GitHub] [netbeans] mbien commented on pull request #3647: update VariableMirrorTranslator to bring it up to standards

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3647:
URL: https://github.com/apache/netbeans/pull/3647#issuecomment-1046171616


   btw Brad, I have two PRs in queue which do some cleanup too. One is touching java/maven.indexer the other java/java.hints.declarative, just mentioning it to avoid conflicts.


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


[GitHub] [netbeans] BradWalker commented on a change in pull request #3647: update VariableMirrorTranslator to bring it up to standards

Posted by GitBox <gi...@apache.org>.
BradWalker commented on a change in pull request #3647:
URL: https://github.com/apache/netbeans/pull/3647#discussion_r810573220



##########
File path: java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java
##########
@@ -156,17 +156,7 @@ private static Object createPristineInstanceOf(Class clazz) {
             Object newInstance = constructor.newInstance();
             return newInstance;
             
-        } catch (InstantiationException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (IllegalAccessException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (IllegalArgumentException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (InvocationTargetException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (NoSuchMethodException ex) {
-            logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
-        } catch (SecurityException ex) {
+        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {

Review comment:
       Hey @mbien , if you like this change, I'll do it..
   ```
           } catch (ReflectiveOperationException | IllegalArgumentException | SecurityException ex) {
               logger.log(Level.INFO, "Problem while creating a pristine instance of "+clazz, ex);
           }
   ```
   




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


[GitHub] [netbeans] BradWalker commented on pull request #3647: update VariableMirrorTranslator to bring it up to standards

Posted by GitBox <gi...@apache.org>.
BradWalker commented on pull request #3647:
URL: https://github.com/apache/netbeans/pull/3647#issuecomment-1046168348


   Firmly agree!! That is exactly my thoughts also..


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


[GitHub] [netbeans] BradWalker merged pull request #3647: update VariableMirrorTranslator to bring it up to standards

Posted by GitBox <gi...@apache.org>.
BradWalker merged pull request #3647:
URL: https://github.com/apache/netbeans/pull/3647


   


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