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
972aab18
Commit
972aab18
authored
Jul 14, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x'
Closes gh-22328
parents
2642b040
0566c29e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
SizeCalculatingEntryWriter.java
...amework/boot/loader/tools/SizeCalculatingEntryWriter.java
+9
-2
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SizeCalculatingEntryWriter.java
View file @
972aab18
...
@@ -98,8 +98,7 @@ final class SizeCalculatingEntryWriter implements EntryWriter {
...
@@ -98,8 +98,7 @@ final class SizeCalculatingEntryWriter implements EntryWriter {
private
OutputStream
outputStream
;
private
OutputStream
outputStream
;
SizeCalculatingOutputStream
()
throws
IOException
{
SizeCalculatingOutputStream
()
{
this
.
tempFile
=
File
.
createTempFile
(
"springboot-"
,
"-entrycontent"
);
this
.
outputStream
=
new
ByteArrayOutputStream
();
this
.
outputStream
=
new
ByteArrayOutputStream
();
}
}
...
@@ -119,11 +118,19 @@ final class SizeCalculatingEntryWriter implements EntryWriter {
...
@@ -119,11 +118,19 @@ final class SizeCalculatingEntryWriter implements EntryWriter {
}
}
private
OutputStream
convertToFileOutputStream
(
ByteArrayOutputStream
byteArrayOutputStream
)
throws
IOException
{
private
OutputStream
convertToFileOutputStream
(
ByteArrayOutputStream
byteArrayOutputStream
)
throws
IOException
{
initializeTempFile
();
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
this
.
tempFile
);
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
this
.
tempFile
);
StreamUtils
.
copy
(
byteArrayOutputStream
.
toByteArray
(),
fileOutputStream
);
StreamUtils
.
copy
(
byteArrayOutputStream
.
toByteArray
(),
fileOutputStream
);
return
fileOutputStream
;
return
fileOutputStream
;
}
}
private
void
initializeTempFile
()
throws
IOException
{
if
(
this
.
tempFile
==
null
)
{
this
.
tempFile
=
File
.
createTempFile
(
"springboot-"
,
"-entrycontent"
);
this
.
tempFile
.
deleteOnExit
();
}
}
@Override
@Override
public
void
close
()
throws
IOException
{
public
void
close
()
throws
IOException
{
this
.
outputStream
.
close
();
this
.
outputStream
.
close
();
...
...
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