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
7e7733d4
Commit
7e7733d4
authored
Jun 25, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deal with spaces in file references
Fixes gh-1169
parent
7654259f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
PropertiesLauncher.java
...a/org/springframework/boot/loader/PropertiesLauncher.java
+3
-1
Handler.java
...ain/java/org/springframework/boot/loader/jar/Handler.java
+2
-1
ExplodedArchiveTests.java
...ngframework/boot/loader/archive/ExplodedArchiveTests.java
+3
-1
JarFileTests.java
...ava/org/springframework/boot/loader/jar/JarFileTests.java
+0
-1
No files found.
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java
View file @
7e7733d4
...
...
@@ -25,6 +25,7 @@ import java.net.URISyntaxException;
import
java.net.URL
;
import
java.net.URLClassLoader
;
import
java.net.URLConnection
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
...
...
@@ -518,7 +519,8 @@ public class PropertiesLauncher extends Launcher {
}
}
else
{
lib
.
add
(
0
,
new
ExplodedArchive
(
new
File
(
url
.
getFile
())));
String
filename
=
URLDecoder
.
decode
(
url
.
getFile
(),
"UTF-8"
);
lib
.
add
(
0
,
new
ExplodedArchive
(
new
File
(
filename
)));
}
}
}
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/Handler.java
View file @
7e7733d4
...
...
@@ -23,6 +23,7 @@ import java.lang.reflect.Method;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.net.URLDecoder
;
import
java.net.URLStreamHandler
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
...
...
@@ -151,7 +152,7 @@ public class Handler extends URLStreamHandler {
throw
new
IllegalStateException
(
"Not a file URL"
);
}
String
path
=
name
.
substring
(
FILE_PROTOCOL
.
length
());
File
file
=
new
File
(
path
);
File
file
=
new
File
(
URLDecoder
.
decode
(
path
,
"UTF-8"
)
);
Map
<
File
,
JarFile
>
cache
=
rootFileCache
.
get
();
JarFile
jarFile
=
(
cache
==
null
?
null
:
cache
.
get
(
file
));
if
(
jarFile
==
null
)
{
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java
View file @
7e7733d4
...
...
@@ -23,6 +23,7 @@ import java.io.InputStream;
import
java.io.OutputStream
;
import
java.net.URL
;
import
java.net.URLClassLoader
;
import
java.net.URLDecoder
;
import
java.util.Enumeration
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -106,7 +107,8 @@ public class ExplodedArchiveTests {
@Test
public
void
getUrl
()
throws
Exception
{
URL
url
=
this
.
archive
.
getUrl
();
assertThat
(
new
File
(
url
.
toURI
()),
equalTo
(
new
File
(
this
.
rootFolder
.
toURI
())));
assertThat
(
new
File
(
URLDecoder
.
decode
(
url
.
getFile
(),
"UTF-8"
)),
equalTo
(
this
.
rootFolder
));
}
@Test
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java
View file @
7e7733d4
...
...
@@ -97,7 +97,6 @@ public class JarFileTests {
assertThat
(
urlClassLoader
.
getResource
(
"special/\u00EB.dat"
),
notNullValue
());
assertThat
(
urlClassLoader
.
getResource
(
"d/9.dat"
),
notNullValue
());
jarFile
.
close
();
}
@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