Skip to content

Commit

Permalink
Update to ASM 9.4 to support Java 20
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelkliemannel committed Oct 13, 2022
1 parent f097c52 commit f1d3698
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

### Fixed

## [2.5.0] - 2022-10-13
### Added
- Update to ASM 9.4 to support Java 20

## [2.4.0] - 2022-09-18
### Added
- Add a built-in overview of all byte code instructions
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Class files can be opened directly from the tool window or the "Analyze Byte Cod

If the editor is the origin of the action execution, the analyzer will pick the class relative to the current cursor position. With this, it is easy to analyze inner, locale, or anonymous classes.

The plugin currently uses [ASM 9.3](https://asm.ow2.io) under the hood, supporting JVM class files up to version 19.
The plugin currently uses [ASM 9.4](https://asm.ow2.io) under the hood, supporting JVM class files up to version 19.

## Features

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ val shadowAsmJar = tasks.create("shadowAsmJar", com.github.jengelman.gradle.plug
dependencies {
api(shadowAsmJar.outputs.files)

val asmVersion = "9.3"
val asmVersion = "9.4"
asm("org.ow2.asm:asm:$asmVersion")
asm("org.ow2.asm:asm-analysis:$asmVersion")
asm("org.ow2.asm:asm-util:$asmVersion")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginGroup=dev.turingcomplete
pluginVersion=2.4.0
pluginVersion=2.5.0
pluginSinceBuild=222
pluginUntilBuild=
platformType=IC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
package dev.turingcomplete.intellijbytecodeplugin.bytecode

import dev.turingcomplete.intellijbytecodeplugin.org.objectweb.asm.Opcodes

object ClassVersionUtils {
// -- Properties -------------------------------------------------------------------------------------------------- //

val CLASS_VERSIONS = arrayOf(ClassVersion(63, "Java SE 19"),
ClassVersion(62, "Java SE 18"),
ClassVersion(61, "Java SE 17"),
ClassVersion(60, "Java SE 16"),
ClassVersion(59, "Java SE 15"),
ClassVersion(58, "Java SE 14"),
ClassVersion(57, "Java SE 13"),
ClassVersion(56, "Java SE 12"),
ClassVersion(55, "Java SE 11"),
ClassVersion(54, "Java SE 10"),
ClassVersion(53, "Java SE 9"),
ClassVersion(52, "Java SE 8"),
ClassVersion(51, "Java SE 7"),
ClassVersion(50, "Java SE 6.0"),
ClassVersion(49, "Java SE 5.0"),
ClassVersion(48, "JDK 1.4"),
ClassVersion(47, "JDK 1.3"),
ClassVersion(46, "JDK 1.2"),
ClassVersion(45, "JDK 1.1"))
val CLASS_VERSIONS = arrayOf(ClassVersion(Opcodes.V20.toByte(), "Java SE 20"),
ClassVersion(Opcodes.V19.toByte(), "Java SE 19"),
ClassVersion(Opcodes.V18.toByte(), "Java SE 18"),
ClassVersion(Opcodes.V17.toByte(), "Java SE 17"),
ClassVersion(Opcodes.V16.toByte(), "Java SE 16"),
ClassVersion(Opcodes.V15.toByte(), "Java SE 15"),
ClassVersion(Opcodes.V14.toByte(), "Java SE 14"),
ClassVersion(Opcodes.V13.toByte(), "Java SE 13"),
ClassVersion(Opcodes.V12.toByte(), "Java SE 12"),
ClassVersion(Opcodes.V11.toByte(), "Java SE 11"),
ClassVersion(Opcodes.V10.toByte(), "Java SE 10"),
ClassVersion(Opcodes.V9.toByte(), "Java SE 9"),
ClassVersion(Opcodes.V1_8.toByte(), "Java SE 8"),
ClassVersion(Opcodes.V1_7.toByte(), "Java SE 7"),
ClassVersion(Opcodes.V1_6.toByte(), "Java SE 6.0"),
ClassVersion(Opcodes.V1_5.toByte(), "Java SE 5.0"),
ClassVersion(Opcodes.V1_4.toByte(), "JDK 1.4"),
ClassVersion(Opcodes.V1_3.toByte(), "JDK 1.3"),
ClassVersion(Opcodes.V1_2.toByte(), "JDK 1.2"),
ClassVersion(Opcodes.V1_1.toByte(), "JDK 1.1"))

val MAJOR_TO_CLASS_VERSION: Map<Byte, ClassVersion> = CLASS_VERSIONS.associateBy { it.major }

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<vendor email="dev@marcelkliemannel.com" url="https://marcelkliemannel.com/projects/intellij-byte-code-plugin">Marcel Kliemannel</vendor>

<description><![CDATA[
<p>This IntelliJ plugin provides a modern and powerful tool window to analyze byte code. Its supports Java, Kotlin, Groovy, and other JVM language class files. Based on ASM 9.3, it currently supports class files up to Java 19.</p>
<p>This IntelliJ plugin provides a modern and powerful tool window to analyze byte code. Its supports Java, Kotlin, Groovy, and other JVM language class files. Based on ASM 9.4, it currently supports class files up to Java 20.</p>
<h2>Features</h2>
Expand Down

0 comments on commit f1d3698

Please sign in to comment.