@Override public Certificate[] getCertificates() throws IOException { return jarURLConnection.getCertificates(); } }
@Override public Certificate[] getCertificates() throws IOException { return jarURLConnection.getCertificates(); } }
@Override public Certificate[] getCertificates() throws IOException { return jarURLConnection.getCertificates(); } }
/** * Form a CodeSource for loaded class. * * @param location a location where the class was loaded from * @return CodeSource */ protected CodeSource createCodeSource(URL location) { Certificate[] certs = null; if (location.getProtocol().equals("jar")) { try { JarURLConnection jarConnection = (JarURLConnection) location .openConnection(); certs = jarConnection.getCertificates(); location = jarConnection.getJarFileURL(); } catch (IOException ioe) { ioe.printStackTrace(); throw new RuntimeException(ioe.getMessage()); } } return new CodeSource(location, certs); }
manifest = juc.getManifest(); final Certificate[] certificates = juc.getCertificates(); codeSource = new CodeSource(url, certificates); } else { // unlikely
? JarURLConnection.class.cast(connection).getCertificates() : NO_CERTIFICATES; bytes = doTransform(resourceName, bytes);
Certificate [] certificates = juc.getCertificates(); if (certs == null){ throw new SecurityException("jar file invalid");