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
7e718cda
Commit
7e718cda
authored
Oct 14, 2015
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant hash from path of unpacked nested library
Closes gh-4124
parent
d55c001a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
JarFileArchive.java
...g/springframework/boot/loader/archive/JarFileArchive.java
+1
-2
JarFileArchiveTests.java
...ingframework/boot/loader/archive/JarFileArchiveTests.java
+1
-1
No files found.
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java
View file @
7e718cda
...
@@ -114,12 +114,11 @@ public class JarFileArchive extends Archive {
...
@@ -114,12 +114,11 @@ public class JarFileArchive extends Archive {
}
}
private
Archive
getUnpackedNestedArchive
(
JarEntryData
data
)
throws
IOException
{
private
Archive
getUnpackedNestedArchive
(
JarEntryData
data
)
throws
IOException
{
AsciiBytes
hash
=
data
.
getComment
().
substring
(
UNPACK_MARKER
.
length
());
String
name
=
data
.
getName
().
toString
();
String
name
=
data
.
getName
().
toString
();
if
(
name
.
lastIndexOf
(
"/"
)
!=
-
1
)
{
if
(
name
.
lastIndexOf
(
"/"
)
!=
-
1
)
{
name
=
name
.
substring
(
name
.
lastIndexOf
(
"/"
)
+
1
);
name
=
name
.
substring
(
name
.
lastIndexOf
(
"/"
)
+
1
);
}
}
File
file
=
new
File
(
getTempUnpackFolder
(),
hash
.
toString
()
+
"-"
+
name
);
File
file
=
new
File
(
getTempUnpackFolder
(),
name
);
if
(!
file
.
exists
()
||
file
.
length
()
!=
data
.
getSize
())
{
if
(!
file
.
exists
()
||
file
.
length
()
!=
data
.
getSize
())
{
unpack
(
data
,
file
);
unpack
(
data
,
file
);
}
}
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java
View file @
7e718cda
...
@@ -97,7 +97,7 @@ public class JarFileArchiveTests {
...
@@ -97,7 +97,7 @@ public class JarFileArchiveTests {
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
(),
startsWith
(
"file:"
));
assertThat
(
nested
.
getUrl
().
toString
(),
startsWith
(
"file:"
));
assertThat
(
nested
.
getUrl
().
toString
(),
endsWith
(
".jar"
));
assertThat
(
nested
.
getUrl
().
toString
(),
endsWith
(
"
/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