8218021: Have jarsigner preserve posix permission attributes

Reviewed-by: weijun, lancea, alanb
This commit is contained in:
Sean Coffey 2020-07-02 08:17:31 +00:00
parent dc63bf261b
commit 3d9bad16d1
14 changed files with 292 additions and 17 deletions

View file

@ -35,21 +35,27 @@ package sun.security.util;
public final class Event {
private Event() {}
public enum ReporterCategory {
CRLCHECK(),
POSIXPERMS();
private Reporter reporter;
}
public interface Reporter {
public void handle(String type, Object... args);
}
private static Reporter reporter;
public static void setReportListener(Reporter re) {
reporter = re;
public static void setReportListener(ReporterCategory cat, Reporter re) {
cat.reporter = re;
}
public static void clearReportListener() {
reporter = null;
public static void clearReportListener(ReporterCategory cat) {
cat.reporter = null;
}
public static void report(String type, Object... args) {
Reporter currentReporter = reporter;
public static void report(ReporterCategory cat, String type, Object... args) {
Reporter currentReporter = cat.reporter;
if (currentReporter != null) {
currentReporter.handle(type, args);