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
b8efef00
Commit
b8efef00
authored
Sep 15, 2018
by
Remi Forax
Browse files
when testing, do not load classes that are tagged as preview
parent
6896b689
Pipeline
#2869
passed with stage
in 6 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
asm-test/src/main/java/org/objectweb/asm/test/AsmTest.java
View file @
b8efef00
...
@@ -385,6 +385,7 @@ public abstract class AsmTest {
...
@@ -385,6 +385,7 @@ public abstract class AsmTest {
}
catch
(
IOException
|
IllegalArgumentException
e
)
{
}
catch
(
IOException
|
IllegalArgumentException
e
)
{
fail
(
"Class can't be dumped, probably invalid"
,
e
);
fail
(
"Class can't be dumped, probably invalid"
,
e
);
}
}
// don't try to load module-info.class
if
(
className
.
endsWith
(
MODULE_INFO
))
{
if
(
className
.
endsWith
(
MODULE_INFO
))
{
if
(
getMajorJavaVersion
()
<
9
)
{
if
(
getMajorJavaVersion
()
<
9
)
{
throw
new
UnsupportedClassVersionError
();
throw
new
UnsupportedClassVersionError
();
...
@@ -392,7 +393,12 @@ public abstract class AsmTest {
...
@@ -392,7 +393,12 @@ public abstract class AsmTest {
return
true
;
return
true
;
}
}
}
else
{
}
else
{
return
doLoadAndInstantiate
(
className
,
classContent
);
// don't try to load preview class (which requires a VM started with --enable-preview)
if
(
getMajorJavaVersion
()
>=
11
&&
classContent
[
4
]
==
-
1
&&
classContent
[
5
]
==
-
1
)
{
return
true
;
}
else
{
return
doLoadAndInstantiate
(
className
,
classContent
);
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
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