This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git

commit e2c68c4931dee7141385af671c4358e511f7c4d7
Author: Jaikiran Pai <jaiki...@apache.org>
AuthorDate: Thu Aug 10 21:50:22 2023 +0530

    Add a note to "permissions" type noting that it is no longer supported in 
Java 18+
---
 manual/Types/permissions.html                        | 6 ++++++
 src/main/org/apache/tools/ant/types/Permissions.java | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/manual/Types/permissions.html b/manual/Types/permissions.html
index 6118ab503..d0db0e327 100644
--- a/manual/Types/permissions.html
+++ b/manual/Types/permissions.html
@@ -25,6 +25,12 @@
 <body>
 
 <h2 id="permissions">Permissions</h2>
+<p><b>Note</b> <code>Permissions</code> requires the use of Java 
SecurityManager.
+  Java version 17 deprecated SecurityManager for removal and Java 18 by 
default disallowed
+  setting SecurityManager at runtime. <code>Permissions</code> is thus no 
longer supported
+  when used in Java 18 or higher versions. Using it in such Java runtime 
versions won't provide the
+  functionality that it originally provided.</p>
+
 <p>Permissions represents a set of security permissions granted or revoked to 
a specific part
 code executed in the JVM where Apache Ant is running in.  The actual 
Permissions are specified
 via a set of nested permission items either <code>&lt;grant&gt;</code>ed
diff --git a/src/main/org/apache/tools/ant/types/Permissions.java 
b/src/main/org/apache/tools/ant/types/Permissions.java
index f017555c5..703c8acc8 100644
--- a/src/main/org/apache/tools/ant/types/Permissions.java
+++ b/src/main/org/apache/tools/ant/types/Permissions.java
@@ -35,7 +35,10 @@ import org.apache.tools.ant.util.SecurityManagerUtil;
 /**
  * This class implements a security manager meant for usage by tasks that run 
inside the
  * Ant VM. An examples are the Java Task and JUnitTask.
+ * <p>
+ * Note: This class doesn't provide any functionality for Java 18 and higher
  *
+ * <p>
  * The basic functionality is that nothing (except for a base set of 
permissions) is allowed, unless
  * the permission is granted either explicitly or implicitly.
  * If a permission is granted this can be overruled by explicitly revoking the 
permission.

Reply via email to