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
5cb07e29
Commit
5cb07e29
authored
Oct 01, 2020
by
Santhoshkumar. P
Committed by
Stephane Nicoll
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish empty string checks
See gh-23550
parent
294af45b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
10 deletions
+11
-10
RabbitProperties.java
...ngframework/boot/autoconfigure/amqp/RabbitProperties.java
+1
-1
CommandCompleter.java
...ingframework/boot/cli/command/shell/CommandCompleter.java
+2
-1
ConfigurationMetadataAnnotationProcessor.java
...onprocessor/ConfigurationMetadataAnnotationProcessor.java
+1
-1
MetadataGenerationEnvironment.java
...configurationprocessor/MetadataGenerationEnvironment.java
+2
-2
TypeUtils.java
...pringframework/boot/configurationprocessor/TypeUtils.java
+1
-1
ConfigurationMetadata.java
...onfigurationprocessor/metadata/ConfigurationMetadata.java
+1
-1
PropertiesLauncher.java
...a/org/springframework/boot/loader/PropertiesLauncher.java
+2
-2
JarFile.java
...ain/java/org/springframework/boot/loader/jar/JarFile.java
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
View file @
5cb07e29
...
@@ -290,7 +290,7 @@ public class RabbitProperties {
...
@@ -290,7 +290,7 @@ public class RabbitProperties {
}
}
public
void
setVirtualHost
(
String
virtualHost
)
{
public
void
setVirtualHost
(
String
virtualHost
)
{
this
.
virtualHost
=
""
.
equals
(
virtualHost
)
?
"/"
:
virtualHost
;
this
.
virtualHost
=
StringUtils
.
hasLength
(
virtualHost
)
?
virtualHost
:
"/"
;
}
}
public
AddressShuffleMode
getAddressShuffleMode
()
{
public
AddressShuffleMode
getAddressShuffleMode
()
{
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/CommandCompleter.java
View file @
5cb07e29
...
@@ -33,6 +33,7 @@ import jline.console.completer.StringsCompleter;
...
@@ -33,6 +33,7 @@ import jline.console.completer.StringsCompleter;
import
org.springframework.boot.cli.command.Command
;
import
org.springframework.boot.cli.command.Command
;
import
org.springframework.boot.cli.command.options.OptionHelp
;
import
org.springframework.boot.cli.command.options.OptionHelp
;
import
org.springframework.boot.cli.util.Log
;
import
org.springframework.boot.cli.util.Log
;
import
org.springframework.util.StringUtils
;
/**
/**
* JLine {@link Completer} for Spring Boot {@link Command}s.
* JLine {@link Completer} for Spring Boot {@link Command}s.
...
@@ -74,7 +75,7 @@ public class CommandCompleter extends StringsCompleter {
...
@@ -74,7 +75,7 @@ public class CommandCompleter extends StringsCompleter {
int
completionIndex
=
super
.
complete
(
buffer
,
cursor
,
candidates
);
int
completionIndex
=
super
.
complete
(
buffer
,
cursor
,
candidates
);
int
spaceIndex
=
buffer
.
indexOf
(
' '
);
int
spaceIndex
=
buffer
.
indexOf
(
' '
);
String
commandName
=
((
spaceIndex
!=
-
1
)
?
buffer
.
substring
(
0
,
spaceIndex
)
:
""
);
String
commandName
=
((
spaceIndex
!=
-
1
)
?
buffer
.
substring
(
0
,
spaceIndex
)
:
""
);
if
(
!
""
.
equals
(
commandName
.
trim
()
))
{
if
(
StringUtils
.
hasText
(
commandName
))
{
for
(
Command
command
:
this
.
commands
)
{
for
(
Command
command
:
this
.
commands
)
{
if
(
command
.
getName
().
equals
(
commandName
))
{
if
(
command
.
getName
().
equals
(
commandName
))
{
if
(
cursor
==
buffer
.
length
()
&&
buffer
.
endsWith
(
" "
))
{
if
(
cursor
==
buffer
.
length
()
&&
buffer
.
endsWith
(
" "
))
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java
View file @
5cb07e29
...
@@ -298,7 +298,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
...
@@ -298,7 +298,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
private
void
processEndpoint
(
AnnotationMirror
annotation
,
TypeElement
element
)
{
private
void
processEndpoint
(
AnnotationMirror
annotation
,
TypeElement
element
)
{
Map
<
String
,
Object
>
elementValues
=
this
.
metadataEnv
.
getAnnotationElementValues
(
annotation
);
Map
<
String
,
Object
>
elementValues
=
this
.
metadataEnv
.
getAnnotationElementValues
(
annotation
);
String
endpointId
=
(
String
)
elementValues
.
get
(
"id"
);
String
endpointId
=
(
String
)
elementValues
.
get
(
"id"
);
if
(
endpointId
==
null
||
""
.
equals
(
endpointId
))
{
if
(
endpointId
==
null
||
endpointId
.
isEmpty
(
))
{
return
;
// Can't process that endpoint
return
;
// Can't process that endpoint
}
}
String
endpointKey
=
ItemMetadata
.
newItemMetadataPrefix
(
"management.endpoint."
,
endpointId
);
String
endpointKey
=
ItemMetadata
.
newItemMetadataPrefix
(
"management.endpoint."
,
endpointId
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/MetadataGenerationEnvironment.java
View file @
5cb07e29
...
@@ -180,8 +180,8 @@ class MetadataGenerationEnvironment {
...
@@ -180,8 +180,8 @@ class MetadataGenerationEnvironment {
reason
=
(
String
)
elementValues
.
get
(
"reason"
);
reason
=
(
String
)
elementValues
.
get
(
"reason"
);
replacement
=
(
String
)
elementValues
.
get
(
"replacement"
);
replacement
=
(
String
)
elementValues
.
get
(
"replacement"
);
}
}
reason
=
""
.
equals
(
reason
)
?
null
:
reason
;
reason
=
(
reason
==
null
||
reason
.
isEmpty
()
)
?
null
:
reason
;
replacement
=
""
.
equals
(
replacement
)
?
null
:
replacement
;
replacement
=
(
replacement
==
null
||
replacement
.
isEmpty
()
)
?
null
:
replacement
;
return
new
ItemDeprecation
(
reason
,
replacement
);
return
new
ItemDeprecation
(
reason
,
replacement
);
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeUtils.java
View file @
5cb07e29
...
@@ -180,7 +180,7 @@ class TypeUtils {
...
@@ -180,7 +180,7 @@ class TypeUtils {
if
(
javadoc
!=
null
)
{
if
(
javadoc
!=
null
)
{
javadoc
=
NEW_LINE_PATTERN
.
matcher
(
javadoc
).
replaceAll
(
""
).
trim
();
javadoc
=
NEW_LINE_PATTERN
.
matcher
(
javadoc
).
replaceAll
(
""
).
trim
();
}
}
return
""
.
equals
(
javadoc
)
?
null
:
javadoc
;
return
(
javadoc
==
null
||
javadoc
.
isEmpty
()
)
?
null
:
javadoc
;
}
}
/**
/**
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata.java
View file @
5cb07e29
...
@@ -171,7 +171,7 @@ public class ConfigurationMetadata {
...
@@ -171,7 +171,7 @@ public class ConfigurationMetadata {
public
static
String
nestedPrefix
(
String
prefix
,
String
name
)
{
public
static
String
nestedPrefix
(
String
prefix
,
String
name
)
{
String
nestedPrefix
=
(
prefix
!=
null
)
?
prefix
:
""
;
String
nestedPrefix
=
(
prefix
!=
null
)
?
prefix
:
""
;
String
dashedName
=
toDashedCase
(
name
);
String
dashedName
=
toDashedCase
(
name
);
nestedPrefix
+=
""
.
equals
(
nestedPrefix
)
?
dashedName
:
"."
+
dashedName
;
nestedPrefix
+=
(
nestedPrefix
==
null
||
nestedPrefix
.
isEmpty
()
)
?
dashedName
:
"."
+
dashedName
;
return
nestedPrefix
;
return
nestedPrefix
;
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java
View file @
5cb07e29
...
@@ -316,7 +316,7 @@ public class PropertiesLauncher extends Launcher {
...
@@ -316,7 +316,7 @@ public class PropertiesLauncher extends Launcher {
for
(
String
path
:
commaSeparatedPaths
.
split
(
","
))
{
for
(
String
path
:
commaSeparatedPaths
.
split
(
","
))
{
path
=
cleanupPath
(
path
);
path
=
cleanupPath
(
path
);
// "" means the user wants root of archive but not current directory
// "" means the user wants root of archive but not current directory
path
=
""
.
equals
(
path
)
?
"/"
:
path
;
path
=
(
path
==
null
||
path
.
isEmpty
()
)
?
"/"
:
path
;
paths
.
add
(
path
);
paths
.
add
(
path
);
}
}
if
(
paths
.
isEmpty
())
{
if
(
paths
.
isEmpty
())
{
...
@@ -631,7 +631,7 @@ public class PropertiesLauncher extends Launcher {
...
@@ -631,7 +631,7 @@ public class PropertiesLauncher extends Launcher {
}
}
EntryFilter
filter
=
new
PrefixMatchingArchiveFilter
(
root
);
EntryFilter
filter
=
new
PrefixMatchingArchiveFilter
(
root
);
List
<
Archive
>
archives
=
asList
(
parent
.
getNestedArchives
(
null
,
filter
));
List
<
Archive
>
archives
=
asList
(
parent
.
getNestedArchives
(
null
,
filter
));
if
((
""
.
equals
(
root
)
||
"."
.
equals
(
root
))
&&
!
path
.
endsWith
(
".jar"
)
if
((
root
==
null
||
root
.
isEmpty
(
)
||
"."
.
equals
(
root
))
&&
!
path
.
endsWith
(
".jar"
)
&&
parent
!=
PropertiesLauncher
.
this
.
parent
)
{
&&
parent
!=
PropertiesLauncher
.
this
.
parent
)
{
// You can't find the root with an entry filter so it has to be added
// You can't find the root with an entry filter so it has to be added
// explicitly. But don't add the root of the parent archive.
// explicitly. But don't add the root of the parent archive.
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java
View file @
5cb07e29
...
@@ -413,7 +413,7 @@ public class JarFile extends AbstractJarFile implements Iterable<java.util.jar.J
...
@@ -413,7 +413,7 @@ public class JarFile extends AbstractJarFile implements Iterable<java.util.jar.J
public
static
void
registerUrlProtocolHandler
()
{
public
static
void
registerUrlProtocolHandler
()
{
String
handlers
=
System
.
getProperty
(
PROTOCOL_HANDLER
,
""
);
String
handlers
=
System
.
getProperty
(
PROTOCOL_HANDLER
,
""
);
System
.
setProperty
(
PROTOCOL_HANDLER
,
System
.
setProperty
(
PROTOCOL_HANDLER
,
(
""
.
equals
(
handlers
)
?
HANDLERS_PACKAGE
:
handlers
+
"|"
+
HANDLERS_PACKAGE
));
(
(
handlers
==
null
||
handlers
.
isEmpty
()
)
?
HANDLERS_PACKAGE
:
handlers
+
"|"
+
HANDLERS_PACKAGE
));
resetCachedUrlHandlers
();
resetCachedUrlHandlers
();
}
}
...
...
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