< prev index next >
src/java.base/share/classes/javax/crypto/SealedObject.java
Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb
*** 335,345 ****
NoSuchProviderException, InvalidKeyException
{
if (key == null) {
throw new NullPointerException("key is null");
}
! if (provider == null || provider.length() == 0) {
throw new IllegalArgumentException("missing provider");
}
try {
return unseal(key, provider);
--- 335,345 ----
NoSuchProviderException, InvalidKeyException
{
if (key == null) {
throw new NullPointerException("key is null");
}
! if (provider == null || provider.isEmpty()) {
throw new IllegalArgumentException("missing provider");
}
try {
return unseal(key, provider);
< prev index next >