Skip to content

Commit

Permalink
8344524: Remove SecurityManager related code from jdk.jlink module
Browse files Browse the repository at this point in the history
Reviewed-by: alanb, lancea, iris
  • Loading branch information
jaikiran committed Nov 21, 2024
1 parent a599c30 commit 400eb9b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 61 deletions.
12 changes: 0 additions & 12 deletions src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Jlink.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,6 @@ public String toString() {
}
}

/**
* Jlink instance constructor, if a security manager is set, the jlink
* permission is checked.
*/
@SuppressWarnings("removal")
public Jlink() {
if (System.getSecurityManager() != null) {
System.getSecurityManager().
checkPermission(new JlinkPermission("jlink"));
}
}

/**
* Build the image.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -44,13 +44,7 @@ public static void main(String... args) throws Exception {
* @param args command line arguments
* @return an exit code. 0 means success, non-zero means an error occurred.
*/
@SuppressWarnings("removal")
public static int run(PrintWriter out, PrintWriter err, String... args) {
if (System.getSecurityManager() != null) {
System.getSecurityManager().
checkPermission(new JlinkPermission("jlink"));
}

JlinkTask t = new JlinkTask();
t.setLog(out, err);
return t.run(args);
Expand Down

0 comments on commit 400eb9b

Please sign in to comment.