Merge pull request #723 from jvinodkumar/Development
Update Base64.java
This commit is contained in:
commit
39806e3fe6
@ -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!");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user