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
4d0da4b7
Commit
4d0da4b7
authored
Sep 27, 2019
by
Yuyan
Committed by
Phillip Webb
Sep 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify code
See gh-18342
parent
a0957d9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
BootArchiveSupport.java
...mework/boot/gradle/tasks/bundling/BootArchiveSupport.java
+2
-2
TomcatServletWebServerFactoryTests.java
...b/embedded/tomcat/TomcatServletWebServerFactoryTests.java
+1
-8
No files found.
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java
View file @
4d0da4b7
...
...
@@ -143,8 +143,8 @@ class BootArchiveSupport {
}
private
boolean
isZip
(
InputStream
inputStream
)
throws
IOException
{
for
(
int
i
=
0
;
i
<
ZIP_FILE_HEADER
.
length
;
i
++
)
{
if
(
inputStream
.
read
()
!=
ZIP_FILE_HEADER
[
i
]
)
{
for
(
byte
b
:
ZIP_FILE_HEADER
)
{
if
(
inputStream
.
read
()
!=
b
)
{
return
false
;
}
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java
View file @
4d0da4b7
...
...
@@ -544,14 +544,7 @@ class TomcatServletWebServerFactoryTests extends AbstractServletWebServerFactory
@Test
void
registerJspServletWithDefaultLoadOnStartup
()
{
TomcatServletWebServerFactory
factory
=
new
TomcatServletWebServerFactory
(
0
);
factory
.
addInitializers
(
new
ServletContextInitializer
()
{
@Override
public
void
onStartup
(
ServletContext
servletContext
)
throws
ServletException
{
servletContext
.
addServlet
(
"manually-registered-jsp-servlet"
,
JspServlet
.
class
);
}
});
factory
.
addInitializers
(
servletContext
->
servletContext
.
addServlet
(
"manually-registered-jsp-servlet"
,
JspServlet
.
class
));
this
.
webServer
=
factory
.
getWebServer
();
this
.
webServer
.
start
();
}
...
...
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