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
ea599762
Commit
ea599762
authored
Dec 30, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract package discovery to separate method
parent
4cfc7b6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
LaunchedURLClassLoader.java
...g/springframework/boot/loader/LaunchedURLClassLoader.java
+5
-5
No files found.
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java
View file @
ea599762
...
...
@@ -122,7 +122,9 @@ public class LaunchedURLClassLoader extends URLClassLoader {
// 2) Try to find locally
try
{
return
findClass
(
name
);
findPackage
(
name
);
Class
<?>
cls
=
findClass
(
name
);
return
cls
;
}
catch
(
Exception
ex
)
{
}
...
...
@@ -131,8 +133,7 @@ public class LaunchedURLClassLoader extends URLClassLoader {
return
super
.
loadClass
(
name
,
false
);
}
@Override
protected
Class
<?>
findClass
(
final
String
name
)
throws
ClassNotFoundException
{
private
void
findPackage
(
final
String
name
)
throws
ClassNotFoundException
{
int
lastDot
=
name
.
lastIndexOf
(
'.'
);
if
(
lastDot
!=
-
1
)
{
String
packageName
=
name
.
substring
(
0
,
lastDot
);
...
...
@@ -145,14 +146,13 @@ public class LaunchedURLClassLoader extends URLClassLoader {
}
}
}
return
super
.
findClass
(
name
);
}
/**
* Define a package before a {@code findClass} call is made. This is necessary to
* ensure that the appropriate manifest for nested JARs associated with the package.
* @param name the class name being found
* @param packageName the pac
ak
ge
* @param packageName the pac
ka
ge
*/
private
void
definePackageForFindClass
(
final
String
name
,
final
String
packageName
)
{
try
{
...
...
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