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
825fc2f7
Commit
825fc2f7
authored
Feb 19, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Omit jar: prefix from jarFileUrl
parent
ed15345d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
JarURLConnection.java
...org/springframework/boot/loader/jar/JarURLConnection.java
+2
-2
JarFileTests.java
...ava/org/springframework/boot/loader/jar/JarFileTests.java
+3
-3
No files found.
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java
View file @
825fc2f7
...
...
@@ -63,12 +63,12 @@ class JarURLConnection extends java.net.JarURLConnection {
* sensible for #getJarFileURL().
*/
if
(
separator
+
SEPARATOR
.
length
()
!=
spec
.
length
())
{
this
.
jarFileUrl
=
new
URL
(
"jar:"
+
spec
);
this
.
jarFileUrl
=
new
URL
(
spec
);
this
.
jarEntryName
=
spec
.
substring
(
separator
+
2
);
}
else
{
// The root of the archive (!/)
this
.
jarFileUrl
=
new
URL
(
"jar:"
+
spec
.
substring
(
0
,
separator
));
this
.
jarFileUrl
=
new
URL
(
spec
.
substring
(
0
,
separator
));
}
}
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java
View file @
825fc2f7
...
...
@@ -150,7 +150,7 @@ public class JarFileTests {
assertThat
(
jarURLConnection
.
getContentLength
(),
greaterThan
(
1
));
assertThat
(
jarURLConnection
.
getContent
(),
sameInstance
((
Object
)
this
.
jarFile
));
assertThat
(
jarURLConnection
.
getContentType
(),
equalTo
(
"x-java/jar"
));
assertThat
(
jarURLConnection
.
getJarFileURL
().
toString
(),
equalTo
(
"
jar:
file:"
assertThat
(
jarURLConnection
.
getJarFileURL
().
toString
(),
equalTo
(
"file:"
+
this
.
rootJarFile
));
}
...
...
@@ -216,8 +216,8 @@ public class JarFileTests {
+
"!/nested.jar!/"
));
JarURLConnection
conn
=
(
JarURLConnection
)
url
.
openConnection
();
assertThat
(
conn
.
getJarFile
(),
sameInstance
(
nestedJarFile
));
assertThat
(
conn
.
getJarFileURL
().
toString
(),
equalTo
(
"jar:file:"
+
this
.
rootJarFile
.
getPath
()
+
"!/nested.jar"
));
assertThat
(
conn
.
getJarFileURL
().
toString
(),
equalTo
(
"file:"
+
this
.
rootJarFile
.
getPath
()
+
"!/nested.jar"
));
}
@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