study notes
  • Introduction
  • Oct 14, 2016
  • Oct 22, 2016
  • Oct 27
  • Nov1
  • j2ee context root(4.19.2017)
  • June 20, 2017(bTrade debug record)
  • Sep 5, 2017
  • Jan 4, 2018
  • Jan 5, 2018Deploy war file to Tomcat
  • Jan 13,2018, hibernate config
  • conflict caused by PR
  • using another project's class
  • intellij cannot resolve the symbols in target folder
  • keyboard symbol
  • Oct 31, 2018
  • tax build construction simplify &effecticent
  • line ending
  • memory leak
  • Serializable
  • To learn
  • What happens when you type 'google.com' into a browser and press Enter?
  • security scan for software
Powered by GitBook
On this page

Was this helpful?

Oct 31, 2018

Previouskeyboard symbolNexttax build construction simplify &effecticent

Last updated 5 years ago

Was this helpful?

Is a difference between the two (org.apache.commons.lang3.StringUtils.isBlankandjava.lang.String.isEmpty)?

checks that each character of the string is a whitespace character (or that the string is empty or that it's null). This is totally different than just checking if the string is empty.

eg:

StringUtils.isBlank:

StringUtils.isBlank(null)   = true
StringUtils.isBlank("")     = true
StringUtils.isBlank(" ")    = true
StringUtils.isBlank("bob")  = false
StringUtils.isBlank(" bob") = false

StringUtils.isEmpty:

StringUtils.isEmpty(null)   = true
StringUtils.isEmpty("")     = true
StringUtils.isEmpty(" ")    = false
StringUtils.isEmpty("bob")  = false
StringUtils.isEmpty(" bob") = false

StringUtils.isEmpty checks for null

StringUtils.isBlank checks if text contains only white space char(s).

https://stackoverflow.com/questions/23419087/stringutils-isblank-vs-string-isempty
StringUtils.isBlank()