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
bb35d180
Commit
bb35d180
authored
Dec 06, 2015
by
mnhock
Committed by
Andy Wilkinson
Dec 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve exception messages to properly include specified sources
Closes gh-4687
parent
ee47ae4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
SpringApplicationRunner.java
...amework/boot/cli/command/run/SpringApplicationRunner.java
+3
-1
TestRunner.java
...org/springframework/boot/cli/command/test/TestRunner.java
+3
-1
No files found.
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/SpringApplicationRunner.java
View file @
bb35d180
...
@@ -22,6 +22,7 @@ import java.lang.reflect.Method;
...
@@ -22,6 +22,7 @@ import java.lang.reflect.Method;
import
java.net.MalformedURLException
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.logging.Level
;
import
java.util.logging.Level
;
...
@@ -117,7 +118,8 @@ public class SpringApplicationRunner {
...
@@ -117,7 +118,8 @@ public class SpringApplicationRunner {
private
Object
[]
compile
()
throws
IOException
{
private
Object
[]
compile
()
throws
IOException
{
Object
[]
compiledSources
=
this
.
compiler
.
compile
(
this
.
sources
);
Object
[]
compiledSources
=
this
.
compiler
.
compile
(
this
.
sources
);
if
(
compiledSources
.
length
==
0
)
{
if
(
compiledSources
.
length
==
0
)
{
throw
new
RuntimeException
(
"No classes found in '"
+
this
.
sources
+
"'"
);
throw
new
RuntimeException
(
"No classes found in '"
+
Arrays
.
toString
(
this
.
sources
)
+
"'"
);
}
}
return
compiledSources
;
return
compiledSources
;
}
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/test/TestRunner.java
View file @
bb35d180
...
@@ -19,6 +19,7 @@ package org.springframework.boot.cli.command.test;
...
@@ -19,6 +19,7 @@ package org.springframework.boot.cli.command.test;
import
java.lang.annotation.Annotation
;
import
java.lang.annotation.Annotation
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.boot.cli.compiler.GroovyCompiler
;
import
org.springframework.boot.cli.compiler.GroovyCompiler
;
...
@@ -55,7 +56,8 @@ public class TestRunner {
...
@@ -55,7 +56,8 @@ public class TestRunner {
public
void
compileAndRunTests
()
throws
Exception
{
public
void
compileAndRunTests
()
throws
Exception
{
Object
[]
sources
=
this
.
compiler
.
compile
(
this
.
sources
);
Object
[]
sources
=
this
.
compiler
.
compile
(
this
.
sources
);
if
(
sources
.
length
==
0
)
{
if
(
sources
.
length
==
0
)
{
throw
new
RuntimeException
(
"No classes found in '"
+
this
.
sources
+
"'"
);
throw
new
RuntimeException
(
"No classes found in '"
+
Arrays
.
toString
(
this
.
sources
)
+
"'"
);
}
}
// Run in new thread to ensure that the context classloader is setup
// Run in new thread to ensure that the context classloader is setup
...
...
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