Merge pull request #723 from jvinodkumar/Development

Update Base64.java
This commit is contained in:
Libin Yang 2019-03-31 18:23:56 +08:00 committed by GitHub
commit 39806e3fe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,8 +135,8 @@ public class Base64 {
if (base64String == null) { if (base64String == null) {
throw new IllegalArgumentException("Base64 string must not be null!"); throw new IllegalArgumentException("Base64 string must not be null!");
} }
// remove trailing spaces if any
base64String = base64String.strip(); base64String = base64String.trim();
if (!isValidBase64String(base64String)) { if (!isValidBase64String(base64String)) {
throw new IllegalArgumentException("String is not a valid Base64 string!"); throw new IllegalArgumentException("String is not a valid Base64 string!");
} }