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
c1b34d03
Commit
c1b34d03
authored
Mar 19, 2019
by
hengyunabc
Committed by
Andy Wilkinson
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer file: to jar:file: URLs in launcher
See gh-16248
parent
84530ce3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
9 deletions
+5
-9
ExplodedArchive.java
.../springframework/boot/loader/archive/ExplodedArchive.java
+1
-1
JarLauncherTests.java
...ava/org/springframework/boot/loader/JarLauncherTests.java
+1
-3
PropertiesLauncherTests.java
.../springframework/boot/loader/PropertiesLauncherTests.java
+1
-1
WarLauncherTests.java
...ava/org/springframework/boot/loader/WarLauncherTests.java
+1
-3
ExplodedArchiveTests.java
...ngframework/boot/loader/archive/ExplodedArchiveTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java
View file @
c1b34d03
...
@@ -117,7 +117,7 @@ public class ExplodedArchive implements Archive {
...
@@ -117,7 +117,7 @@ public class ExplodedArchive implements Archive {
protected
Archive
getNestedArchive
(
Entry
entry
)
throws
IOException
{
protected
Archive
getNestedArchive
(
Entry
entry
)
throws
IOException
{
File
file
=
((
FileEntry
)
entry
).
getFile
();
File
file
=
((
FileEntry
)
entry
).
getFile
();
return
(
file
.
isDirectory
()
?
new
ExplodedArchive
(
file
)
return
(
file
.
isDirectory
()
?
new
ExplodedArchive
(
file
)
:
new
JarFileArchive
(
file
));
:
new
JarFileArchive
(
file
,
file
.
toURI
().
toURL
()
));
}
}
@Override
@Override
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/JarLauncherTests.java
View file @
c1b34d03
...
@@ -44,9 +44,7 @@ public class JarLauncherTests extends AbstractExecutableArchiveLauncherTests {
...
@@ -44,9 +44,7 @@ public class JarLauncherTests extends AbstractExecutableArchiveLauncherTests {
assertThat
(
archives
).
hasSize
(
2
);
assertThat
(
archives
).
hasSize
(
2
);
assertThat
(
getUrls
(
archives
)).
containsOnly
(
assertThat
(
getUrls
(
archives
)).
containsOnly
(
new
File
(
explodedRoot
,
"BOOT-INF/classes"
).
toURI
().
toURL
(),
new
File
(
explodedRoot
,
"BOOT-INF/classes"
).
toURI
().
toURL
(),
new
URL
(
"jar:"
new
File
(
explodedRoot
,
"BOOT-INF/lib/foo.jar"
).
toURI
().
toURL
());
+
new
File
(
explodedRoot
,
"BOOT-INF/lib/foo.jar"
).
toURI
().
toURL
()
+
"!/"
));
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java
View file @
c1b34d03
...
@@ -142,7 +142,7 @@ public class PropertiesLauncherTests {
...
@@ -142,7 +142,7 @@ public class PropertiesLauncherTests {
assertThat
(
ReflectionTestUtils
.
getField
(
launcher
,
"paths"
).
toString
())
assertThat
(
ReflectionTestUtils
.
getField
(
launcher
,
"paths"
).
toString
())
.
isEqualTo
(
"[jars/]"
);
.
isEqualTo
(
"[jars/]"
);
List
<
Archive
>
archives
=
launcher
.
getClassPathArchives
();
List
<
Archive
>
archives
=
launcher
.
getClassPathArchives
();
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar
!/
"
));
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar"
));
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/WarLauncherTests.java
View file @
c1b34d03
...
@@ -44,9 +44,7 @@ public class WarLauncherTests extends AbstractExecutableArchiveLauncherTests {
...
@@ -44,9 +44,7 @@ public class WarLauncherTests extends AbstractExecutableArchiveLauncherTests {
assertThat
(
archives
).
hasSize
(
2
);
assertThat
(
archives
).
hasSize
(
2
);
assertThat
(
getUrls
(
archives
)).
containsOnly
(
assertThat
(
getUrls
(
archives
)).
containsOnly
(
new
File
(
explodedRoot
,
"WEB-INF/classes"
).
toURI
().
toURL
(),
new
File
(
explodedRoot
,
"WEB-INF/classes"
).
toURI
().
toURL
(),
new
URL
(
"jar:"
new
File
(
explodedRoot
,
"WEB-INF/lib/foo.jar"
).
toURI
().
toURL
());
+
new
File
(
explodedRoot
,
"WEB-INF/lib/foo.jar"
).
toURI
().
toURL
()
+
"!/"
));
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java
View file @
c1b34d03
...
@@ -127,7 +127,7 @@ public class ExplodedArchiveTests {
...
@@ -127,7 +127,7 @@ public class ExplodedArchiveTests {
Entry
entry
=
getEntriesMap
(
this
.
archive
).
get
(
"nested.jar"
);
Entry
entry
=
getEntriesMap
(
this
.
archive
).
get
(
"nested.jar"
);
Archive
nested
=
this
.
archive
.
getNestedArchive
(
entry
);
Archive
nested
=
this
.
archive
.
getNestedArchive
(
entry
);
assertThat
(
nested
.
getUrl
().
toString
())
assertThat
(
nested
.
getUrl
().
toString
())
.
isEqualTo
(
"jar:"
+
this
.
rootFolder
.
toURI
()
+
"nested.jar!/
"
);
.
isEqualTo
(
this
.
rootFolder
.
toURI
()
+
"nested.jar
"
);
}
}
@Test
@Test
...
...
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