< prev index next >
src/java.base/share/classes/java/lang/Package.java
Print this page
@@ -593,11 +593,11 @@
private final URL url;
private volatile Manifest manifest;
CachedManifest(final String fileName) {
this.fileName = fileName;
- this.url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+ this.url = AccessController.doPrivileged(new PrivilegedAction<>() {
public URL run() {
final File file = new File(fileName);
if (file.isFile()) {
try {
return ParseUtil.fileToEncodedURL(file);
@@ -624,11 +624,11 @@
synchronized (this) {
m = manifest;
if (m != null) {
return m;
}
- m = AccessController.doPrivileged(new PrivilegedAction<Manifest>() {
+ m = AccessController.doPrivileged(new PrivilegedAction<>() {
public Manifest run() {
try (FileInputStream fis = new FileInputStream(fileName);
JarInputStream jis = new JarInputStream(fis, false)) {
return jis.getManifest();
} catch (IOException e) {
< prev index next >