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
Jamie Mansfield
asm
Commits
d0afe0cd
Commit
d0afe0cd
authored
Jun 30, 2018
by
Remi Forax
Browse files
Merge branch 'bump-version-support-to-12' into 'master'
Bump supported class version to V_12 (56) See merge request
asm/asm!187
parents
9a421251
c7308027
Changes
4
Hide whitespace changes
Inline
Side-by-side
asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java
View file @
d0afe0cd
...
...
@@ -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 @
d0afe0cd
...
...
@@ -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 @
d0afe0cd
...
...
@@ -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 @
d0afe0cd
...
...
@@ -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
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