You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2022/10/12 11:11:25 UTC

[GitHub] [tomcat] DigitalFatCat opened a new pull request, #555: Update OpenSSLEngine.java changed 'toArray(new String[0])' to 'toArray(new String[size])'

DigitalFatCat opened a new pull request, #555:
URL: https://github.com/apache/tomcat/pull/555

   It should use 'toArray(new String[0])' instead of 'toArray(new String[size])'


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] aooohan commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'

Posted by GitBox <gi...@apache.org>.
aooohan commented on PR #555:
URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276008234

   It doesn't make sense to do this.


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] ChristopherSchultz commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'

Posted by GitBox <gi...@apache.org>.
ChristopherSchultz commented on PR #555:
URL: https://github.com/apache/tomcat/pull/555#issuecomment-1277717245

   If we _really_ want to improve performance, we should be using static zero-sized arrays instead of instantiating them each time. A zero-item array is immutable, and thus infinitely sharable everywhere.


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] markt-asf commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'

Posted by GitBox <gi...@apache.org>.
markt-asf commented on PR #555:
URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276040032

   It usually does make sense. See https://www.baeldung.com/java-collection-toarray-methods
   I thought we'd been through the code base and fixed all these previously. A quick search indicates that isn't the case - or we missed quite a few. I have patch locally to address all of the remaining toArray() calls that I just need to review before committing.


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] aooohan closed pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'

Posted by GitBox <gi...@apache.org>.
aooohan closed pull request #555: Update OpenSSLEngine.java  changed 'toArray(new String[size])'  to  'toArray(new String[0])'
URL: https://github.com/apache/tomcat/pull/555


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] aooohan commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'

Posted by GitBox <gi...@apache.org>.
aooohan commented on PR #555:
URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276131546

   @DigitalFatCat  Thanks for the PR.  : )


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] ChristopherSchultz commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'

Posted by GitBox <gi...@apache.org>.
ChristopherSchultz commented on PR #555:
URL: https://github.com/apache/tomcat/pull/555#issuecomment-1277719549

   > > It usually does make sense. See https://www.baeldung.com/java-collection-toarray-methods
   > 
   > Wow, interesting, it turns out that there is a difference in performance between these. I am ashamed of my ignorance.
   
   You should not feel bad at all. It makes absolutely zero sense that this would be faster than anything else, and yet it is measurably so.


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] aooohan commented on pull request #555: Update OpenSSLEngine.java changed 'toArray(new String[size])' to 'toArray(new String[0])'

Posted by GitBox <gi...@apache.org>.
aooohan commented on PR #555:
URL: https://github.com/apache/tomcat/pull/555#issuecomment-1276129749

   > It usually does make sense. See https://www.baeldung.com/java-collection-toarray-methods
   
   Wow, interesting, it turns out that there is a difference in performance between these. I am ashamed of my ignorance.
   > I have patch locally to address all of the remaining toArray() calls that I just need to review before committing.
   
   Ok


-- 
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: dev-unsubscribe@tomcat.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org