String: length of zero and null value are not same. but, this code return null when string has length of zero.
So, I think it need to be more specific. if the parameter String(source) value is null -> then NullPointException is occured (automatically). and if String length is not valid (that is length is not 1) -> then IllegalArgumentException ocurred by the code.
Please check and leave a comment. thank you.
Comment From: pivotal-issuemaster
@minuk8932 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@minuk8932 Thank you for signing the Contributor License Agreement!