Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
d2b28ceb
Commit
d2b28ceb
authored
Sep 18, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't add -Xverify:none to JVM args when running on Java 13
Closes gh-17008
parent
ce2c26e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
BootRun.java
...va/org/springframework/boot/gradle/tasks/run/BootRun.java
+17
-1
RunMojo.java
...src/main/java/org/springframework/boot/maven/RunMojo.java
+13
-1
No files found.
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java
View file @
d2b28ceb
...
...
@@ -16,6 +16,9 @@
package
org
.
springframework
.
boot
.
gradle
.
tasks
.
run
;
import
java.lang.reflect.Method
;
import
org.gradle.api.JavaVersion
;
import
org.gradle.api.file.SourceDirectorySet
;
import
org.gradle.api.tasks.Input
;
import
org.gradle.api.tasks.JavaExec
;
...
...
@@ -69,7 +72,11 @@ public class BootRun extends JavaExec {
public
void
exec
()
{
if
(
this
.
optimizedLaunch
)
{
setJvmArgs
(
getJvmArgs
());
jvmArgs
(
"-Xverify:none"
,
"-XX:TieredStopAtLevel=1"
);
JavaVersion
.
current
();
if
(!
isJava13OrLater
())
{
jvmArgs
(
"-Xverify:none"
);
}
jvmArgs
(
"-XX:TieredStopAtLevel=1"
);
}
if
(
System
.
console
()
!=
null
)
{
// Record that the console is available here for AnsiOutput to detect later
...
...
@@ -78,4 +85,13 @@ public class BootRun extends JavaExec {
super
.
exec
();
}
private
boolean
isJava13OrLater
()
{
for
(
Method
method
:
String
.
class
.
getMethods
())
{
if
(
method
.
getName
().
equals
(
"stripIndent"
))
{
return
true
;
}
}
return
false
;
}
}
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java
View file @
d2b28ceb
...
...
@@ -17,6 +17,7 @@
package
org
.
springframework
.
boot
.
maven
;
import
java.io.File
;
import
java.lang.reflect.Method
;
import
java.net.URL
;
import
java.net.URLClassLoader
;
import
java.util.List
;
...
...
@@ -81,11 +82,22 @@ public class RunMojo extends AbstractRunMojo {
RunArguments
jvmArguments
=
super
.
resolveJvmArguments
();
if
(
isFork
()
&&
this
.
optimizedLaunch
)
{
jvmArguments
.
getArgs
().
addFirst
(
"-XX:TieredStopAtLevel=1"
);
jvmArguments
.
getArgs
().
addFirst
(
"-Xverify:none"
);
if
(!
isJava13OrLater
())
{
jvmArguments
.
getArgs
().
addFirst
(
"-Xverify:none"
);
}
}
return
jvmArguments
;
}
private
boolean
isJava13OrLater
()
{
for
(
Method
method
:
String
.
class
.
getMethods
())
{
if
(
method
.
getName
().
equals
(
"stripIndent"
))
{
return
true
;
}
}
return
false
;
}
@Override
protected
void
runWithForkedJvm
(
File
workingDirectory
,
List
<
String
>
args
,
Map
<
String
,
String
>
environmentVariables
)
throws
MojoExecutionException
{
...
...
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