Skip to content

Commit

Permalink
prepare for Java 9
Browse files Browse the repository at this point in the history
Using Java 9 EA b74
  • Loading branch information
hrj committed Aug 4, 2015
1 parent fe8fcec commit 75125b3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ This is only required while running in Eclipse (that is when the URL Class Loade
CORE_PERMISSIONS.add(fp);
}
}

// Java 9 early access requires this while loading resources in Swing internal code.
// TODO: This could be reported upstream. The Swing code should call doPrivileged().
// Alternatively, check if it is still required when final release of Java 9 is available.
CORE_PERMISSIONS.add(new FilePermission(JAVA_HOME + recursiveSuffix, "read"));
}

}
Expand Down Expand Up @@ -273,6 +278,8 @@ public Boolean run() {
}
} else if (ExtensionManager.ZIPENTRY_PROTOCOL.equalsIgnoreCase(scheme)) {
return true;
} else if ("jrt".equals(scheme)) {
return true;
} else {
return false;
}
Expand Down Expand Up @@ -433,6 +440,8 @@ public PermissionCollection getPermissions(final CodeSource codesource) {

permissions.add(new RuntimePermission("accessClassInPackage.*"));
permissions.add(new SecurityPermission("putProviderProperty.*"));
} else if (path.startsWith("jrt:/jdk")) {
permissions.add(new RuntimePermission("accessClassInPackage.sun.*"));
}
} else {
// TODO: Check why the following are required and add comments for each
Expand Down

0 comments on commit 75125b3

Please sign in to comment.