Skip to content

Commit df06185

Browse files
authored
Add support for Java 17 and update ASM to version 9.2 (#180)
See: - https://asm.ow2.io/versions.html - https://gitlab.ow2.org/asm/asm/-/compare/ASM_9_0...ASM_9_2
1 parent f214716 commit df06185

File tree

7 files changed

+669
-6
lines changed

7 files changed

+669
-6
lines changed

build.xml

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
<equals arg1="${-cleaned.specification.version}" arg2="14"/>
6565
<equals arg1="${-cleaned.specification.version}" arg2="15"/>
6666
<equals arg1="${-cleaned.specification.version}" arg2="16"/>
67+
<equals arg1="${-cleaned.specification.version}" arg2="17"/>
6768
</or>
6869
</condition>
6970

@@ -158,6 +159,7 @@
158159
<equals arg1="${build.java.runtime}" arg2="14"/>
159160
<equals arg1="${build.java.runtime}" arg2="15"/>
160161
<equals arg1="${build.java.runtime}" arg2="16"/>
162+
<equals arg1="${build.java.runtime}" arg2="17"/>
161163
</or>
162164
</condition>
163165

ivy.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!DOCTYPE ivy-module [
1818
<!ENTITY maven.version "2.0">
1919
<!ENTITY gradle.version "3.2">
20-
<!ENTITY asm.version "9.1">
20+
<!ENTITY asm.version "9.2">
2121
<!ENTITY jarjar.asm.version "5.2">
2222
]>
2323
<ivy-module version="2.0">

src/main/docs/bundled-signatures.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ <h1>Bundled Signatures Documentation</h1>
2929
<li><strong><tt>jdk-unsafe-*</tt>:</strong> Signatures
3030
of &quot;unsafe&quot; methods that use default charset, default locale, or default timezone. For server applications it is very
3131
stupid to call those methods, as the results will definitely not what the user wants
32-
(for Java <tt>*</tt> = 1.7, 1.8, 9, 10, 11, 12, 13, 14, 15, 16; Ant / Maven / Gradle automatically add the compile Java version).</li>
32+
(for Java <tt>*</tt> = 1.7, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17; Ant / Maven / Gradle automatically add the compile Java version).</li>
3333

3434
<li><strong><tt>jdk-deprecated-*</tt>:</strong> This disallows all deprecated
35-
methods from the JDK (for Java <tt>*</tt> = 1.7, 1.8, 9, 10, 11, 12, 13, 14, 15, 16; Ant / Maven / Gradle automatically add the compile Java version).</li>
35+
methods from the JDK (for Java <tt>*</tt> = 1.7, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17; Ant / Maven / Gradle automatically add the compile Java version).</li>
3636

3737
<li><strong><tt>jdk-internal-*</tt>:</strong> Lists all internal packages of the JDK as of <code>Security.getProperty(&quot;package.access&quot;)</code>.
3838
Calling those methods will always trigger security manager and is completely forbidden from Java 9 on
39-
(for Java <tt>*</tt> = 1.7, 1.8, 9, 10, 11, 12, 13, 14, 15, 16; Ant / Maven / Gradle automatically add the compile Java version, <em>since forbiddenapis v2.1</em>).</li>
39+
(for Java <tt>*</tt> = 1.7, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17; Ant / Maven / Gradle automatically add the compile Java version, <em>since forbiddenapis v2.1</em>).</li>
4040

4141
<li><strong><tt>jdk-non-portable</tt>:</strong> Signatures of all non-portable (like <code>com.sun.management.HotSpotDiagnosticMXBean</code>)
4242
or internal runtime APIs (like <code>sun.misc.Unsafe</code>). This is a superset of <tt>jdk-internal</tt>.<br>
@@ -58,4 +58,4 @@ <h1>Bundled Signatures Documentation</h1>
5858
</ul>
5959

6060
</body>
61-
</html>
61+
</html>

src/main/java/de/thetaphi/forbiddenapis/AsmUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private static byte[] readStream(final InputStream in) throws IOException {
179179
@SuppressWarnings("unused")
180180
public static ClassReader readAndPatchClass(InputStream in) throws IOException {
181181
final byte[] bytecode = readStream(in);
182-
if (false) patchClassMajorVersion(bytecode, Opcodes.V16 + 1, Opcodes.V16);
182+
if (false) patchClassMajorVersion(bytecode, Opcodes.V17 + 1, Opcodes.V17);
183183
return new ClassReader(bytecode);
184184
}
185185

0 commit comments

Comments
 (0)