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
56396857
Commit
56396857
authored
Apr 29, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Prefer file: to jar:file: URLs in launcher"
See gh-16248
parent
c1b34d03
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
ExplodedArchive.java
.../springframework/boot/loader/archive/ExplodedArchive.java
+2
-2
JarFileArchive.java
...g/springframework/boot/loader/archive/JarFileArchive.java
+2
-2
JarLauncherTests.java
...ava/org/springframework/boot/loader/JarLauncherTests.java
+1
-1
PropertiesLauncherTests.java
.../springframework/boot/loader/PropertiesLauncherTests.java
+4
-4
WarLauncherTests.java
...ava/org/springframework/boot/loader/WarLauncherTests.java
+1
-1
JarFileArchiveTests.java
...ingframework/boot/loader/archive/JarFileArchiveTests.java
+2
-2
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java
View file @
56396857
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -117,7 +117,7 @@ public class ExplodedArchive implements Archive {
protected
Archive
getNestedArchive
(
Entry
entry
)
throws
IOException
{
File
file
=
((
FileEntry
)
entry
).
getFile
();
return
(
file
.
isDirectory
()
?
new
ExplodedArchive
(
file
)
:
new
JarFileArchive
(
file
,
file
.
toURI
().
toURL
()
));
:
new
JarFileArchive
(
file
));
}
@Override
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java
View file @
56396857
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -53,7 +53,7 @@ public class JarFileArchive implements Archive {
private
File
tempUnpackFolder
;
public
JarFileArchive
(
File
file
)
throws
IOException
{
this
(
file
,
null
);
this
(
file
,
file
.
toURI
().
toURL
()
);
}
public
JarFileArchive
(
File
file
,
URL
url
)
throws
IOException
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/JarLauncherTests.java
View file @
56396857
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java
View file @
56396857
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -176,7 +176,7 @@ public class PropertiesLauncherTests {
.
isEqualTo
(
"[jar:file:./src/test/resources/nested-jars/app.jar!/]"
);
List
<
Archive
>
archives
=
launcher
.
getClassPathArchives
();
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"foo.jar!/"
));
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar
!/
"
));
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar"
));
}
@Test
...
...
@@ -185,7 +185,7 @@ public class PropertiesLauncherTests {
PropertiesLauncher
launcher
=
new
PropertiesLauncher
();
List
<
Archive
>
archives
=
launcher
.
getClassPathArchives
();
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"foo.jar!/"
));
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar
!/
"
));
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar"
));
}
@Test
...
...
@@ -204,7 +204,7 @@ public class PropertiesLauncherTests {
PropertiesLauncher
launcher
=
new
PropertiesLauncher
();
List
<
Archive
>
archives
=
launcher
.
getClassPathArchives
();
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"foo.jar!/"
));
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar
!/
"
));
assertThat
(
archives
).
areExactly
(
1
,
endingWith
(
"app.jar"
));
}
@Test
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/WarLauncherTests.java
View file @
56396857
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java
View file @
56396857
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -84,7 +84,7 @@ public class JarFileArchiveTests {
@Test
public
void
getUrl
()
throws
Exception
{
URL
url
=
this
.
archive
.
getUrl
();
assertThat
(
url
.
toString
()).
isEqualTo
(
"jar:"
+
this
.
rootJarFileUrl
+
"!/"
);
assertThat
(
url
.
toString
()).
isEqualTo
(
this
.
rootJarFileUrl
);
}
@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