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
6d8b8493
Commit
6d8b8493
authored
Jan 06, 2020
by
liuhuan
Committed by
Stephane Nicoll
Jan 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make equality checks defensive to null reference
See gh-19540
parent
e87ed08e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
ResourceUtils.java
...java/org/springframework/boot/cli/util/ResourceUtils.java
+2
-2
RestDocsWebTestClientBuilderCustomizer.java
...gure/restdocs/RestDocsWebTestClientBuilderCustomizer.java
+1
-1
LoaderZipEntries.java
...ramework/boot/gradle/tasks/bundling/LoaderZipEntries.java
+1
-1
Repackager.java
...ava/org/springframework/boot/loader/tools/Repackager.java
+3
-3
No files found.
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/util/ResourceUtils.java
View file @
6d8b8493
...
...
@@ -102,7 +102,7 @@ public abstract class ResourceUtils {
List
<
String
>
result
=
new
ArrayList
<>();
for
(
Resource
resource
:
resources
)
{
if
(
resource
.
exists
())
{
if
(
resource
.
getURI
().
getScheme
().
equals
(
"file"
)
&&
resource
.
getFile
().
isDirectory
())
{
if
(
"file"
.
equals
(
resource
.
getURI
().
getScheme
()
)
&&
resource
.
getFile
().
isDirectory
())
{
result
.
addAll
(
getChildFiles
(
resource
));
continue
;
}
...
...
@@ -124,7 +124,7 @@ public abstract class ResourceUtils {
}
private
static
String
absolutePath
(
Resource
resource
)
throws
IOException
{
if
(!
resource
.
getURI
().
getScheme
().
equals
(
"file"
))
{
if
(!
"file"
.
equals
(
resource
.
getURI
().
getScheme
()
))
{
return
resource
.
getURL
().
toExternalForm
();
}
return
resource
.
getFile
().
getAbsoluteFile
().
toURI
().
toString
();
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsWebTestClientBuilderCustomizer.java
View file @
6d8b8493
...
...
@@ -61,7 +61,7 @@ class RestDocsWebTestClientBuilderCustomizer implements WebTestClientBuilderCust
if
(
port
==
null
)
{
return
true
;
}
return
(
scheme
.
equals
(
"http"
)
&&
port
==
80
)
||
(
scheme
.
equals
(
"https"
)
&&
port
==
443
);
return
(
"http"
.
equals
(
scheme
)
&&
port
==
80
)
||
(
"https"
.
equals
(
scheme
)
&&
port
==
443
);
}
}
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/LoaderZipEntries.java
View file @
6d8b8493
...
...
@@ -50,7 +50,7 @@ class LoaderZipEntries {
getClass
().
getResourceAsStream
(
"/META-INF/loader/spring-boot-loader.jar"
)))
{
java
.
util
.
zip
.
ZipEntry
entry
=
loaderJar
.
getNextEntry
();
while
(
entry
!=
null
)
{
if
(
entry
.
isDirectory
()
&&
!
entry
.
getName
().
equals
(
"META-INF/"
))
{
if
(
entry
.
isDirectory
()
&&
!
"META-INF/"
.
equals
(
entry
.
getName
()
))
{
writeDirectory
(
new
ZipArchiveEntry
(
entry
),
zipOutputStream
);
writtenDirectoriesSpec
.
add
(
entry
);
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java
View file @
6d8b8493
...
...
@@ -369,12 +369,12 @@ public class Repackager {
@Override
public
JarArchiveEntry
transform
(
JarArchiveEntry
entry
)
{
if
(
entry
.
getName
().
equals
(
"META-INF/INDEX.LIST"
))
{
if
(
"META-INF/INDEX.LIST"
.
equals
(
entry
.
getName
()
))
{
return
null
;
}
if
((
entry
.
getName
().
startsWith
(
"META-INF/"
)
&&
!
entry
.
getName
().
equals
(
"META-INF/aop.xml"
)
if
((
entry
.
getName
().
startsWith
(
"META-INF/"
)
&&
!
"META-INF/aop.xml"
.
equals
(
entry
.
getName
()
)
&&
!
entry
.
getName
().
endsWith
(
".kotlin_module"
))
||
entry
.
getName
().
startsWith
(
"BOOT-INF/"
)
||
entry
.
getName
().
equals
(
"module-info.class"
))
{
||
"module-info.class"
.
equals
(
entry
.
getName
()
))
{
return
entry
;
}
JarArchiveEntry
renamedEntry
=
new
JarArchiveEntry
(
this
.
namePrefix
+
entry
.
getName
());
...
...
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