Small improvements

This commit is contained in:
M66B 2019-12-24 10:24:53 +01:00
parent 7bc405537d
commit 2135d1bdce
2 changed files with 2 additions and 2 deletions

View File

@ -1033,7 +1033,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
// throws DecoderException extends IllegalStateException // throws DecoderException extends IllegalStateException
PemObject pem = new PemReader(new InputStreamReader(is)).readPemObject(); PemObject pem = new PemReader(new InputStreamReader(is)).readPemObject();
if (pem == null) if (pem == null)
throw new IllegalStateException(); throw new IllegalStateException("Invalid key file");
ByteArrayInputStream bis = new ByteArrayInputStream(pem.getContent()); ByteArrayInputStream bis = new ByteArrayInputStream(pem.getContent());
cert = (X509Certificate) fact.generateCertificate(bis); cert = (X509Certificate) fact.generateCertificate(bis);
} }

View File

@ -135,7 +135,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
*/ */
ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r"); ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r");
if (pfd == null) if (pfd == null)
throw new IllegalArgumentException(); throw new IllegalArgumentException("Contact inaccessible");
pfd.close(); pfd.close();
ivAvatar.setImageURI(uri); ivAvatar.setImageURI(uri);