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
9108b81b
Commit
9108b81b
authored
Apr 08, 2021
by
Scott Frederick
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x' into 2.4.x
Closes gh-25937
parents
5aa1e683
0ad7f762
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
ZipFileTarArchive.java
...amework/boot/buildpack/platform/io/ZipFileTarArchive.java
+3
-2
ZipFileTarArchiveTests.java
...rk/boot/buildpack/platform/io/ZipFileTarArchiveTests.java
+4
-1
No files found.
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/io/ZipFileTarArchive.java
View file @
9108b81b
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
...
@@ -80,7 +80,7 @@ public class ZipFileTarArchive implements TarArchive {
+
"' is not compatible with buildpacks; ensure jar file is valid and launch script is not enabled"
);
}
catch
(
IOException
ex
)
{
throw
new
IllegalStateException
(
"File is not readable"
,
ex
);
throw
new
IllegalStateException
(
"File
'"
+
jarFile
+
"'
is not readable"
,
ex
);
}
}
...
...
@@ -99,6 +99,7 @@ public class ZipFileTarArchive implements TarArchive {
tarEntry
.
setUserId
(
this
.
owner
.
getUid
());
tarEntry
.
setGroupId
(
this
.
owner
.
getGid
());
tarEntry
.
setModTime
(
NORMALIZED_MOD_TIME
);
tarEntry
.
setMode
(
zipEntry
.
getUnixMode
());
if
(!
zipEntry
.
isDirectory
())
{
tarEntry
.
setSize
(
zipEntry
.
getSize
());
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/io/ZipFileTarArchiveTests.java
View file @
9108b81b
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
...
@@ -36,6 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
* Tests for {@link ZipFileTarArchive}.
*
* @author Phillip Webb
* @author Scott Frederick
*/
class
ZipFileTarArchiveTests
{
...
...
@@ -75,6 +76,7 @@ class ZipFileTarArchiveTests {
assertThat
(
fileEntry
.
getLongUserId
()).
isEqualTo
(
123
);
assertThat
(
fileEntry
.
getLongGroupId
()).
isEqualTo
(
456
);
assertThat
(
fileEntry
.
getSize
()).
isEqualTo
(
4
);
assertThat
(
fileEntry
.
getMode
()).
isEqualTo
(
0755
);
assertThat
(
tarStream
).
hasContent
(
"test"
);
}
}
...
...
@@ -85,6 +87,7 @@ class ZipFileTarArchiveTests {
zip
.
putArchiveEntry
(
dirEntry
);
zip
.
closeArchiveEntry
();
ZipArchiveEntry
fileEntry
=
new
ZipArchiveEntry
(
"spring/boot"
);
fileEntry
.
setUnixMode
(
0755
);
zip
.
putArchiveEntry
(
fileEntry
);
zip
.
write
(
"test"
.
getBytes
(
StandardCharsets
.
UTF_8
));
zip
.
closeArchiveEntry
();
...
...
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