[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340873#comment-16340873
 ] 

ASF GitHub Bot commented on DRILL-6106:
---------------------------------------

Github user reudismam commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1099#discussion_r164076111
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java ---
    @@ -94,7 +94,7 @@ private String getStringProperty(String name, String 
defaultValue) {
       private int getIntProperty(String name, int defaultValue) {
         int value = defaultValue;
         if ( (properties != null) && (properties.containsKey(name))) {
    -      value = new Integer(properties.getProperty(name)).intValue();
    +      value = Integer.valueOf(properties.getProperty(name)).intValue();
    --- End diff --
    
    According to Java documentation, there are benefits in using valueOf for 
Double and Float.
    
    
https://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#valueOf(double)
    
https://docs.oracle.com/javase/7/docs/api/java/lang/Float.html#valueOf(float)


> Use valueOf method instead of constructor since valueOf has a higher 
> performance by caching frequently requested values.
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6106
>                 URL: https://issues.apache.org/jira/browse/DRILL-6106
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Reudismam Rolim de Sousa
>            Priority: Minor
>
> Use valueOf method instead of constructor since valueOf has a higher 
> performance by caching frequently requested values.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to