private static String[] getSubjectAlts(X509Certificate x509certificate, String s) { LinkedList linkedlist; byte byte0; if (isIPAddress(s)) { byte0 = 7; } else { byte0 = 2; } linkedlist = new LinkedList(); s = null; try { x509certificate = x509certificate.getSubjectAlternativeNames(); } // Misplaced declaration of an exception variable catch (X509Certificate x509certificate) { x509certificate = s; } if (x509certificate != null) { x509certificate = x509certificate.iterator(); do { if (!x509certificate.hasNext()) { break; } s = (List) x509certificate.next(); if (((Integer) s.get(0)).intValue() == byte0) { linkedlist.add((String) s.get(1)); } } while (true); } if (!linkedlist.isEmpty()) { x509certificate = new String[linkedlist.size()]; linkedlist.toArray(x509certificate); return x509certificate; } else { return null; } }