Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jamie Mansfield
asm
Commits
c7308027
Commit
c7308027
authored
Jun 26, 2018
by
Remi Forax
Browse files
Bump supported class version to V_12 (56)
parent
9a421251
Changes
4
Hide whitespace changes
Inline
Side-by-side
asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java
View file @
c7308027
...
...
@@ -80,6 +80,7 @@ public class ASMifier extends Printer {
classVersions
.
put
(
Opcodes
.
V9
,
"V9"
);
classVersions
.
put
(
Opcodes
.
V10
,
"V10"
);
classVersions
.
put
(
Opcodes
.
V11
,
"V11"
);
classVersions
.
put
(
Opcodes
.
V12
,
"V12"
);
CLASS_VERSIONS
=
Collections
.
unmodifiableMap
(
classVersions
);
}
...
...
asm/src/main/java/org/objectweb/asm/ClassReader.java
View file @
c7308027
...
...
@@ -171,7 +171,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
1
)
{
if
(
checkClassVersion
&&
readShort
(
classFileOffset
+
6
)
>
Opcodes
.
V1
2
)
{
throw
new
IllegalArgumentException
(
"Unsupported class file major version "
+
readShort
(
classFileOffset
+
6
));
}
...
...
asm/src/main/java/org/objectweb/asm/Opcodes.java
View file @
c7308027
...
...
@@ -69,6 +69,7 @@ public interface Opcodes {
int
V9
=
0
<<
16
|
53
;
int
V10
=
0
<<
16
|
54
;
int
V11
=
0
<<
16
|
55
;
int
V12
=
0
<<
16
|
56
;
/**
* Version flag indicating that the class is using 'preview' features.
...
...
asm/src/test/java/org/objectweb/asm/ConstantsTest.java
View file @
c7308027
...
...
@@ -79,6 +79,7 @@ public class ConstantsTest {
case
"V9"
:
case
"V10"
:
case
"V11"
:
case
"V12"
:
assertFalse
(
classVersions
.
contains
(
field
.
getInt
(
null
)));
classVersions
.
add
(
field
.
getInt
(
null
));
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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