Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
asm
asm
Commits
90a5d2b2
Commit
90a5d2b2
authored
Jun 12, 2021
by
Remi Forax
Browse files
Merge branch 'add-support-version-java18' into 'master'
add support of Java 18 See merge request
!323
parents
8ef178c4
1412c762
Pipeline
#13761
passed with stage
in 6 minutes and 28 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java
View file @
90a5d2b2
...
...
@@ -107,6 +107,7 @@ public class ASMifier extends Printer {
classVersions
.
put
(
Opcodes
.
V15
,
"V15"
);
classVersions
.
put
(
Opcodes
.
V16
,
"V16"
);
classVersions
.
put
(
Opcodes
.
V17
,
"V17"
);
classVersions
.
put
(
Opcodes
.
V18
,
"V18"
);
CLASS_VERSIONS
=
Collections
.
unmodifiableMap
(
classVersions
);
}
...
...
asm/src/main/java/org/objectweb/asm/ClassReader.java
View file @
90a5d2b2
...
...
@@ -194,7 +194,7 @@ public class ClassReader {
this
.
b
=
classFileBuffer
;
// Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively.
if
(
checkClassVersion
&&
readShort
(
classFileOffset
+
6
)
>
Opcodes
.
V1
7
)
{
if
(
checkClassVersion
&&
readShort
(
classFileOffset
+
6
)
>
Opcodes
.
V1
8
)
{
throw
new
IllegalArgumentException
(
"Unsupported class file major version "
+
readShort
(
classFileOffset
+
6
));
}
...
...
asm/src/main/java/org/objectweb/asm/Opcodes.java
View file @
90a5d2b2
...
...
@@ -283,6 +283,7 @@ public interface Opcodes {
int
V15
=
0
<<
16
|
59
;
int
V16
=
0
<<
16
|
60
;
int
V17
=
0
<<
16
|
61
;
int
V18
=
0
<<
16
|
62
;
/**
* Version flag indicating that the class is using 'preview' features.
...
...
asm/src/test/java/org/objectweb/asm/ConstantsTest.java
View file @
90a5d2b2
...
...
@@ -250,6 +250,7 @@ public class ConstantsTest {
case
"V15"
:
case
"V16"
:
case
"V17"
:
case
"V18"
:
return
ConstantType
.
CLASS_VERSION
;
case
"ACC_PUBLIC"
:
case
"ACC_PRIVATE"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment