You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/01/25 13:07:04 UTC

[GitHub] [lucene-solr] uschindler edited a comment on issue #1172: SOLR-14189 switch from String.trim() to StringUtils.isBlank()

uschindler edited a comment on issue #1172: SOLR-14189 switch from String.trim() to StringUtils.isBlank()
URL: https://github.com/apache/lucene-solr/pull/1172#issuecomment-578404626
 
 
   IsBlank() is behaving fine. If you look at its source code all is checked:
   - null means blank
   - empty means blank
   - all remaining characters are tested on isWhitespace(), if one non-ws found it bails out with false.
   
   So common case is fast.
   
   So this is the best replacement. We should also look for similar patterns at other places in Solr.
   
   +1

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org