From 96dac0f9791e47b72fb25f19cd57a49cd1f444a1 Mon Sep 17 00:00:00 2001 From: krtkush Date: Mon, 22 Oct 2018 23:12:25 +0530 Subject: [PATCH] Code review suggested changes. --- .../org/schabi/newpipe/CheckForNewAppVersionTask.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java b/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java index 9ab0f5d36..e122a5688 100644 --- a/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java +++ b/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersionTask.java @@ -194,17 +194,12 @@ public class CheckForNewAppVersionTask extends AsyncTask { Signature[] signatures = packageInfo.signatures; byte[] cert = signatures[0].toByteArray(); InputStream input = new ByteArrayInputStream(cert); + CertificateFactory cf = null; - - try { - cf = CertificateFactory.getInstance("X509"); - } catch (CertificateException e) { - e.printStackTrace(); - } - X509Certificate c = null; try { + cf = CertificateFactory.getInstance("X509"); c = (X509Certificate) cf.generateCertificate(input); } catch (CertificateException e) { e.printStackTrace();