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
195def0e
Commit
195def0e
authored
Sep 15, 2020
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x' into 2.2.x
parents
5a266155
e0030094
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
JarFileEntries.java
...a/org/springframework/boot/loader/jar/JarFileEntries.java
+2
-1
JarFileTests.java
...ava/org/springframework/boot/loader/jar/JarFileTests.java
+7
-4
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFileEntries.java
View file @
195def0e
...
@@ -353,11 +353,12 @@ class JarFileEntries implements CentralDirectoryVisitor, Iterable<JarEntry> {
...
@@ -353,11 +353,12 @@ class JarFileEntries implements CentralDirectoryVisitor, Iterable<JarEntry> {
try
(
JarInputStream
certifiedJarStream
=
new
JarInputStream
(
this
.
jarFile
.
getData
().
getInputStream
()))
{
try
(
JarInputStream
certifiedJarStream
=
new
JarInputStream
(
this
.
jarFile
.
getData
().
getInputStream
()))
{
java
.
util
.
jar
.
JarEntry
certifiedEntry
=
null
;
java
.
util
.
jar
.
JarEntry
certifiedEntry
=
null
;
while
((
certifiedEntry
=
certifiedJarStream
.
getNextJarEntry
())
!=
null
)
{
while
((
certifiedEntry
=
certifiedJarStream
.
getNextJarEntry
())
!=
null
)
{
// Entry must be closed to trigger a read and set entry certificates
certifiedJarStream
.
closeEntry
();
int
index
=
getEntryIndex
(
certifiedEntry
.
getName
());
int
index
=
getEntryIndex
(
certifiedEntry
.
getName
());
if
(
index
!=
-
1
)
{
if
(
index
!=
-
1
)
{
certifications
[
index
]
=
JarEntryCertification
.
from
(
certifiedEntry
);
certifications
[
index
]
=
JarEntryCertification
.
from
(
certifiedEntry
);
}
}
certifiedJarStream
.
closeEntry
();
}
}
}
}
this
.
certifications
=
certifications
;
this
.
certifications
=
certifications
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java
View file @
195def0e
...
@@ -407,10 +407,13 @@ class JarFileTests {
...
@@ -407,10 +407,13 @@ class JarFileTests {
while
(
actualEntries
.
hasMoreElements
())
{
while
(
actualEntries
.
hasMoreElements
())
{
JarEntry
actualEntry
=
actualEntries
.
nextElement
();
JarEntry
actualEntry
=
actualEntries
.
nextElement
();
java
.
util
.
jar
.
JarEntry
expectedEntry
=
expected
.
getJarEntry
(
actualEntry
.
getName
());
java
.
util
.
jar
.
JarEntry
expectedEntry
=
expected
.
getJarEntry
(
actualEntry
.
getName
());
assertThat
(
actualEntry
.
getCertificates
()).
as
(
actualEntry
.
getName
())
StreamUtils
.
drain
(
expected
.
getInputStream
(
expectedEntry
));
.
isEqualTo
(
expectedEntry
.
getCertificates
());
if
(!
actualEntry
.
getName
().
equals
(
"META-INF/MANIFEST.MF"
))
{
assertThat
(
actualEntry
.
getCodeSigners
()).
as
(
actualEntry
.
getName
())
assertThat
(
actualEntry
.
getCertificates
()).
as
(
actualEntry
.
getName
())
.
isEqualTo
(
expectedEntry
.
getCodeSigners
());
.
isEqualTo
(
expectedEntry
.
getCertificates
());
assertThat
(
actualEntry
.
getCodeSigners
()).
as
(
actualEntry
.
getName
())
.
isEqualTo
(
expectedEntry
.
getCodeSigners
());
}
}
}
assertThat
(
stopWatch
.
getTotalTimeSeconds
()).
isLessThan
(
3.0
);
assertThat
(
stopWatch
.
getTotalTimeSeconds
()).
isLessThan
(
3.0
);
}
}
...
...
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