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
80da9cf5
Commit
80da9cf5
authored
Jul 29, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
bb7401a8
aeb88519
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
57 additions
and
58 deletions
+57
-58
ConditionsReportEndpoint.java
...ate/autoconfigure/condition/ConditionsReportEndpoint.java
+1
-1
PropertiesMeterFilter.java
.../actuate/autoconfigure/metrics/PropertiesMeterFilter.java
+1
-1
EndpointDiscoverer.java
.../boot/actuate/endpoint/annotation/EndpointDiscoverer.java
+1
-1
ServletEndpointRegistrar.java
...k/boot/actuate/endpoint/web/ServletEndpointRegistrar.java
+1
-1
JerseyEndpointResourceFactory.java
...te/endpoint/web/jersey/JerseyEndpointResourceFactory.java
+1
-1
MetricsEndpoint.java
...springframework/boot/actuate/metrics/MetricsEndpoint.java
+1
-1
WebMvcTags.java
...ramework/boot/actuate/metrics/web/servlet/WebMvcTags.java
+1
-1
HttpExchangeTracer.java
...framework/boot/actuate/trace/http/HttpExchangeTracer.java
+1
-1
RabbitProperties.java
...ngframework/boot/autoconfigure/amqp/RabbitProperties.java
+1
-1
ConditionMessage.java
...mework/boot/autoconfigure/condition/ConditionMessage.java
+1
-1
ConditionOutcome.java
...mework/boot/autoconfigure/condition/ConditionOutcome.java
+1
-1
ProjectInfoAutoConfiguration.java
...boot/autoconfigure/info/ProjectInfoAutoConfiguration.java
+1
-1
JerseyAutoConfiguration.java
...rk/boot/autoconfigure/jersey/JerseyAutoConfiguration.java
+1
-1
ResourceProperties.java
...gframework/boot/autoconfigure/web/ResourceProperties.java
+1
-1
WebConversionService.java
...k/boot/autoconfigure/web/format/WebConversionService.java
+1
-1
WebServicesAutoConfiguration.java
...toconfigure/webservices/WebServicesAutoConfiguration.java
+1
-1
CommandRunner.java
...a/org/springframework/boot/cli/command/CommandRunner.java
+1
-1
InitializrServiceMetadata.java
...work/boot/cli/command/init/InitializrServiceMetadata.java
+1
-1
ShellPrompts.java
.../springframework/boot/cli/command/shell/ShellPrompts.java
+1
-1
GroovyCompiler.java
...org/springframework/boot/cli/compiler/GroovyCompiler.java
+1
-1
CliTester.java
...src/test/java/org/springframework/boot/cli/CliTester.java
+1
-1
HttpTunnelConnection.java
...ork/boot/devtools/tunnel/client/HttpTunnelConnection.java
+1
-1
HttpTunnelConnectionTests.java
...oot/devtools/tunnel/client/HttpTunnelConnectionTests.java
+1
-2
AnnotationsPropertySource.java
...t/autoconfigure/properties/AnnotationsPropertySource.java
+1
-1
JsonContentAssert.java
...org/springframework/boot/test/json/JsonContentAssert.java
+3
-3
JsonReader.java
...pringframework/boot/configurationmetadata/JsonReader.java
+1
-1
ConfigurationMetadataAnnotationProcessor.java
...onprocessor/ConfigurationMetadataAnnotationProcessor.java
+2
-2
JsonMarshaller.java
.../boot/configurationprocessor/metadata/JsonMarshaller.java
+1
-1
JavaExecutable.java
...org/springframework/boot/loader/tools/JavaExecutable.java
+1
-1
PropertiesLauncher.java
...a/org/springframework/boot/loader/PropertiesLauncher.java
+1
-1
Handler.java
...ain/java/org/springframework/boot/loader/jar/Handler.java
+2
-2
JarURLConnection.java
...org/springframework/boot/loader/jar/JarURLConnection.java
+2
-2
ImageBanner.java
...t/src/main/java/org/springframework/boot/ImageBanner.java
+1
-1
ResourceBanner.java
...rc/main/java/org/springframework/boot/ResourceBanner.java
+1
-1
SpringApplicationBannerPrinter.java
.../springframework/boot/SpringApplicationBannerPrinter.java
+1
-1
ContextIdApplicationContextInitializer.java
.../boot/context/ContextIdApplicationContextInitializer.java
+1
-1
ConfigFileApplicationListener.java
...rk/boot/context/config/ConfigFileApplicationListener.java
+1
-1
LoggingApplicationListener.java
...work/boot/context/logging/LoggingApplicationListener.java
+1
-1
MapBinder.java
...ringframework/boot/context/properties/bind/MapBinder.java
+1
-1
ConfigurationPropertyName.java
.../context/properties/source/ConfigurationPropertyName.java
+5
-5
FilteredConfigurationPropertiesSource.java
...perties/source/FilteredConfigurationPropertiesSource.java
+1
-1
SystemEnvironmentPropertyMapper.java
...xt/properties/source/SystemEnvironmentPropertyMapper.java
+1
-1
ApplicationHome.java
...java/org/springframework/boot/system/ApplicationHome.java
+1
-1
ServerPortInfoApplicationContextInitializer.java
.../context/ServerPortInfoApplicationContextInitializer.java
+1
-1
TomcatWebServer.java
...ngframework/boot/web/embedded/tomcat/TomcatWebServer.java
+1
-1
ServletContextInitializerBeans.java
...work/boot/web/servlet/ServletContextInitializerBeans.java
+1
-1
AbstractServletWebServerFactoryTests.java
.../servlet/server/AbstractServletWebServerFactoryTests.java
+1
-1
ChatService.java
...mosphere/src/main/java/sample/atmosphere/ChatService.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/condition/ConditionsReportEndpoint.java
View file @
80da9cf5
...
...
@@ -209,7 +209,7 @@ public class ConditionsReportEndpoint {
this
.
message
=
outcome
.
getMessage
();
}
else
{
this
.
message
=
(
outcome
.
isMatch
()
?
"matched"
:
"did not match"
)
;
this
.
message
=
outcome
.
isMatch
()
?
"matched"
:
"did not match"
;
}
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/PropertiesMeterFilter.java
View file @
80da9cf5
...
...
@@ -69,7 +69,7 @@ public class PropertiesMeterFilter implements MeterFilter {
@Override
public
MeterFilterReply
accept
(
Meter
.
Id
id
)
{
boolean
enabled
=
lookup
(
this
.
properties
.
getEnable
(),
id
,
true
);
return
(
enabled
?
MeterFilterReply
.
NEUTRAL
:
MeterFilterReply
.
DENY
)
;
return
enabled
?
MeterFilterReply
.
NEUTRAL
:
MeterFilterReply
.
DENY
;
}
@Override
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/EndpointDiscoverer.java
View file @
80da9cf5
...
...
@@ -224,7 +224,7 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
}
private
<
T
>
T
getLast
(
List
<
T
>
list
)
{
return
(
CollectionUtils
.
isEmpty
(
list
)
?
null
:
list
.
get
(
list
.
size
()
-
1
)
);
return
CollectionUtils
.
isEmpty
(
list
)
?
null
:
list
.
get
(
list
.
size
()
-
1
);
}
private
void
assertNoDuplicateOperations
(
EndpointBean
endpointBean
,
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/ServletEndpointRegistrar.java
View file @
80da9cf5
...
...
@@ -61,7 +61,7 @@ public class ServletEndpointRegistrar implements ServletContextInitializer {
ExposableServletEndpoint
endpoint
)
{
String
name
=
endpoint
.
getId
()
+
"-actuator-endpoint"
;
String
path
=
this
.
basePath
+
"/"
+
endpoint
.
getRootPath
();
String
urlMapping
=
(
path
.
endsWith
(
"/"
)
?
path
+
"*"
:
path
+
"/*"
)
;
String
urlMapping
=
path
.
endsWith
(
"/"
)
?
path
+
"*"
:
path
+
"/*"
;
EndpointServlet
endpointServlet
=
endpoint
.
getEndpointServlet
();
Dynamic
registration
=
servletContext
.
addServlet
(
name
,
endpointServlet
.
getServlet
());
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyEndpointResourceFactory.java
View file @
80da9cf5
...
...
@@ -188,7 +188,7 @@ public class JerseyEndpointResourceFactory {
private
Response
convertToJaxRsResponse
(
Object
response
,
String
httpMethod
)
{
if
(
response
==
null
)
{
boolean
isGet
=
HttpMethod
.
GET
.
equals
(
httpMethod
);
Status
status
=
(
isGet
?
Status
.
NOT_FOUND
:
Status
.
NO_CONTENT
)
;
Status
status
=
isGet
?
Status
.
NOT_FOUND
:
Status
.
NO_CONTENT
;
return
Response
.
status
(
status
).
build
();
}
try
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/MetricsEndpoint.java
View file @
80da9cf5
...
...
@@ -132,7 +132,7 @@ public class MetricsEndpoint {
}
private
BiFunction
<
Double
,
Double
,
Double
>
mergeFunction
(
Statistic
statistic
)
{
return
(
Statistic
.
MAX
.
equals
(
statistic
)
?
Double:
:
max
:
Double:
:
sum
)
;
return
Statistic
.
MAX
.
equals
(
statistic
)
?
Double:
:
max
:
Double:
:
sum
;
}
private
Map
<
String
,
Set
<
String
>>
getAvailableTags
(
List
<
Meter
>
meters
)
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcTags.java
View file @
80da9cf5
...
...
@@ -123,7 +123,7 @@ public final class WebMvcTags {
private
static
String
getPathInfo
(
HttpServletRequest
request
)
{
String
pathInfo
=
request
.
getPathInfo
();
String
uri
=
(
StringUtils
.
hasText
(
pathInfo
)
?
pathInfo
:
"/"
)
;
String
uri
=
StringUtils
.
hasText
(
pathInfo
)
?
pathInfo
:
"/"
;
return
uri
.
replaceAll
(
"//+"
,
"/"
).
replaceAll
(
"/$"
,
""
);
}
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/trace/http/HttpExchangeTracer.java
View file @
80da9cf5
...
...
@@ -86,7 +86,7 @@ public class HttpExchangeTracer {
}
private
<
T
>
T
getIfIncluded
(
Include
include
,
Supplier
<
T
>
valueSupplier
)
{
return
(
this
.
includes
.
contains
(
include
)
?
valueSupplier
.
get
()
:
null
)
;
return
this
.
includes
.
contains
(
include
)
?
valueSupplier
.
get
()
:
null
;
}
private
<
T
>
void
setIfIncluded
(
Include
include
,
Supplier
<
T
>
supplier
,
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
View file @
80da9cf5
...
...
@@ -260,7 +260,7 @@ public class RabbitProperties {
}
public
void
setVirtualHost
(
String
virtualHost
)
{
this
.
virtualHost
=
(
""
.
equals
(
virtualHost
)
?
"/"
:
virtualHost
)
;
this
.
virtualHost
=
""
.
equals
(
virtualHost
)
?
"/"
:
virtualHost
;
}
public
Duration
getRequestedHeartbeat
()
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java
View file @
80da9cf5
...
...
@@ -48,7 +48,7 @@ public final class ConditionMessage {
}
private
ConditionMessage
(
ConditionMessage
prior
,
String
message
)
{
this
.
message
=
(
prior
.
isEmpty
()
?
message
:
prior
+
"; "
+
message
)
;
this
.
message
=
prior
.
isEmpty
()
?
message
:
prior
+
"; "
+
message
;
}
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java
View file @
80da9cf5
...
...
@@ -111,7 +111,7 @@ public class ConditionOutcome {
* @return the message or {@code null}
*/
public
String
getMessage
()
{
return
(
this
.
message
.
isEmpty
()
?
null
:
this
.
message
.
toString
()
);
return
this
.
message
.
isEmpty
()
?
null
:
this
.
message
.
toString
(
);
}
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfiguration.java
View file @
80da9cf5
...
...
@@ -72,7 +72,7 @@ public class ProjectInfoAutoConfiguration {
}
protected
Properties
loadFrom
(
Resource
location
,
String
prefix
)
throws
IOException
{
String
p
=
(
prefix
.
endsWith
(
"."
)
?
prefix
:
prefix
+
"."
)
;
String
p
=
prefix
.
endsWith
(
"."
)
?
prefix
:
prefix
+
"."
;
Properties
source
=
PropertiesLoaderUtils
.
loadProperties
(
location
);
Properties
target
=
new
Properties
();
for
(
String
key
:
source
.
stringPropertyNames
())
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.java
View file @
80da9cf5
...
...
@@ -195,7 +195,7 @@ public class JerseyAutoConfiguration implements ServletContextAware {
if
(!
applicationPath
.
startsWith
(
"/"
))
{
applicationPath
=
"/"
+
applicationPath
;
}
return
(
applicationPath
.
equals
(
"/"
)
?
"/*"
:
applicationPath
+
"/*"
)
;
return
applicationPath
.
equals
(
"/"
)
?
"/*"
:
applicationPath
+
"/*"
;
}
@Override
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ResourceProperties.java
View file @
80da9cf5
...
...
@@ -69,7 +69,7 @@ public class ResourceProperties {
String
[]
normalized
=
new
String
[
staticLocations
.
length
];
for
(
int
i
=
0
;
i
<
staticLocations
.
length
;
i
++)
{
String
location
=
staticLocations
[
i
];
normalized
[
i
]
=
(
location
.
endsWith
(
"/"
)
?
location
:
location
+
"/"
)
;
normalized
[
i
]
=
location
.
endsWith
(
"/"
)
?
location
:
location
+
"/"
;
}
return
normalized
;
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/format/WebConversionService.java
View file @
80da9cf5
...
...
@@ -61,7 +61,7 @@ public class WebConversionService extends DefaultFormattingConversionService {
*/
public
WebConversionService
(
String
dateFormat
)
{
super
(
false
);
this
.
dateFormat
=
(
StringUtils
.
hasText
(
dateFormat
)
?
dateFormat
:
null
)
;
this
.
dateFormat
=
StringUtils
.
hasText
(
dateFormat
)
?
dateFormat
:
null
;
if
(
this
.
dateFormat
!=
null
)
{
addFormatters
();
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/webservices/WebServicesAutoConfiguration.java
View file @
80da9cf5
...
...
@@ -152,7 +152,7 @@ public class WebServicesAutoConfiguration {
}
private
String
ensureTrailingSlash
(
String
path
)
{
return
(
path
.
endsWith
(
"/"
)
?
path
:
path
+
"/"
)
;
return
path
.
endsWith
(
"/"
)
?
path
:
path
+
"/"
;
}
}
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java
View file @
80da9cf5
...
...
@@ -54,7 +54,7 @@ public class CommandRunner implements Iterable<Command> {
* @param name the name of the runner or {@code null}
*/
public
CommandRunner
(
String
name
)
{
this
.
name
=
(
StringUtils
.
hasLength
(
name
)
?
name
+
" "
:
""
)
;
this
.
name
=
StringUtils
.
hasLength
(
name
)
?
name
+
" "
:
""
;
}
/**
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrServiceMetadata.java
View file @
80da9cf5
...
...
@@ -212,7 +212,7 @@ class InitializrServiceMetadata {
private
String
getStringValue
(
JSONObject
object
,
String
name
,
String
defaultValue
)
throws
JSONException
{
return
(
object
.
has
(
name
)
?
object
.
getString
(
name
)
:
defaultValue
)
;
return
object
.
has
(
name
)
?
object
.
getString
(
name
)
:
defaultValue
;
}
private
Map
<
String
,
String
>
parseStringItems
(
JSONObject
json
)
throws
JSONException
{
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/ShellPrompts.java
View file @
80da9cf5
...
...
@@ -54,7 +54,7 @@ public class ShellPrompts {
* @return the current prompt
*/
public
String
getPrompt
()
{
return
(
this
.
prompts
.
isEmpty
()
?
DEFAULT_PROMPT
:
this
.
prompts
.
peek
()
);
return
this
.
prompts
.
isEmpty
()
?
DEFAULT_PROMPT
:
this
.
prompts
.
peek
(
);
}
}
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java
View file @
80da9cf5
...
...
@@ -322,7 +322,7 @@ public class GroovyCompiler {
return
node
;
}
}
return
(
classes
.
isEmpty
()
?
null
:
classes
.
get
(
0
)
);
return
classes
.
isEmpty
()
?
null
:
classes
.
get
(
0
);
}
}
...
...
spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/CliTester.java
View file @
80da9cf5
...
...
@@ -154,7 +154,7 @@ public class CliTester implements TestRule {
}
}
else
{
sources
[
i
]
=
(
new
File
(
arg
).
isAbsolute
()
?
arg
:
this
.
prefix
+
arg
)
;
sources
[
i
]
=
new
File
(
arg
).
isAbsolute
()
?
arg
:
this
.
prefix
+
arg
;
}
}
return
sources
;
...
...
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnection.java
View file @
80da9cf5
...
...
@@ -101,7 +101,7 @@ public class HttpTunnelConnection implements TunnelConnection {
protected
final
ClientHttpRequest
createRequest
(
boolean
hasPayload
)
throws
IOException
{
HttpMethod
method
=
(
hasPayload
?
HttpMethod
.
POST
:
HttpMethod
.
GET
)
;
HttpMethod
method
=
hasPayload
?
HttpMethod
.
POST
:
HttpMethod
.
GET
;
return
this
.
requestFactory
.
createRequest
(
this
.
uri
,
method
);
}
...
...
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/client/HttpTunnelConnectionTests.java
View file @
80da9cf5
...
...
@@ -161,8 +161,7 @@ public class HttpTunnelConnectionTests {
private
TunnelChannel
openTunnel
(
boolean
singleThreaded
)
throws
Exception
{
HttpTunnelConnection
connection
=
new
HttpTunnelConnection
(
this
.
url
,
this
.
requestFactory
,
(
singleThreaded
?
new
CurrentThreadExecutor
()
:
null
));
this
.
requestFactory
,
singleThreaded
?
new
CurrentThreadExecutor
()
:
null
);
return
connection
.
open
(
this
.
incomingChannel
,
this
.
closeable
);
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/AnnotationsPropertySource.java
View file @
80da9cf5
...
...
@@ -164,7 +164,7 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
private
String
dotAppend
(
String
prefix
,
String
postfix
)
{
if
(
StringUtils
.
hasText
(
prefix
))
{
return
(
prefix
.
endsWith
(
"."
)
?
prefix
+
postfix
:
prefix
+
"."
+
postfix
)
;
return
prefix
.
endsWith
(
"."
)
?
prefix
+
postfix
:
prefix
+
"."
+
postfix
;
}
return
postfix
;
}
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JsonContentAssert.java
View file @
80da9cf5
...
...
@@ -991,7 +991,7 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
}
try
{
return
JSONCompare
.
compareJSON
(
(
(
expectedJson
!=
null
)
?
expectedJson
.
toString
()
:
null
)
,
(
expectedJson
!=
null
)
?
expectedJson
.
toString
()
:
null
,
this
.
actual
.
toString
(),
compareMode
);
}
catch
(
Exception
ex
)
{
...
...
@@ -1009,7 +1009,7 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
}
try
{
return
JSONCompare
.
compareJSON
(
(
(
expectedJson
!=
null
)
?
expectedJson
.
toString
()
:
null
)
,
(
expectedJson
!=
null
)
?
expectedJson
.
toString
()
:
null
,
this
.
actual
.
toString
(),
comparator
);
}
catch
(
Exception
ex
)
{
...
...
@@ -1054,7 +1054,7 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
JsonPathValue
(
CharSequence
expression
,
Object
...
args
)
{
org
.
springframework
.
util
.
Assert
.
hasText
(
(
(
expression
!=
null
)
?
expression
.
toString
()
:
null
)
,
(
expression
!=
null
)
?
expression
.
toString
()
:
null
,
"expression must not be null or empty"
);
this
.
expression
=
String
.
format
(
expression
.
toString
(),
args
);
this
.
jsonPath
=
JsonPath
.
compile
(
this
.
expression
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/JsonReader.java
View file @
80da9cf5
...
...
@@ -178,7 +178,7 @@ class JsonReader {
.
setReplacement
(
deprecationJsonObject
.
optString
(
"replacement"
,
null
));
return
deprecation
;
}
return
(
object
.
optBoolean
(
"deprecated"
)
?
new
Deprecation
()
:
null
)
;
return
object
.
optBoolean
(
"deprecated"
)
?
new
Deprecation
()
:
null
;
}
private
Deprecation
.
Level
parseDeprecationLevel
(
String
value
)
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java
View file @
80da9cf5
...
...
@@ -302,7 +302,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
||
isDeprecated
(
source
);
this
.
metadataCollector
.
add
(
ItemMetadata
.
newProperty
(
prefix
,
name
,
dataType
,
sourceType
,
null
,
description
,
defaultValue
,
(
deprecated
?
getItemDeprecation
(
getter
)
:
null
)
));
deprecated
?
getItemDeprecation
(
getter
)
:
null
));
}
});
}
...
...
@@ -344,7 +344,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
boolean
deprecated
=
isDeprecated
(
field
)
||
isDeprecated
(
source
);
this
.
metadataCollector
.
add
(
ItemMetadata
.
newProperty
(
prefix
,
name
,
dataType
,
sourceType
,
null
,
description
,
defaultValue
,
(
deprecated
?
new
ItemDeprecation
()
:
null
)
));
deprecated
?
new
ItemDeprecation
()
:
null
));
}
});
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/JsonMarshaller.java
View file @
80da9cf5
...
...
@@ -111,7 +111,7 @@ public class JsonMarshaller {
.
setReplacement
(
deprecationJsonObject
.
optString
(
"replacement"
,
null
));
return
deprecation
;
}
return
(
object
.
optBoolean
(
"deprecated"
)
?
new
ItemDeprecation
()
:
null
)
;
return
object
.
optBoolean
(
"deprecated"
)
?
new
ItemDeprecation
()
:
null
;
}
private
ItemHint
toItemHint
(
JSONObject
object
)
throws
Exception
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JavaExecutable.java
View file @
80da9cf5
...
...
@@ -43,7 +43,7 @@ public class JavaExecutable {
private
File
findInJavaHome
(
String
javaHome
)
{
File
bin
=
new
File
(
new
File
(
javaHome
),
"bin"
);
File
command
=
new
File
(
bin
,
"java.exe"
);
command
=
(
command
.
exists
()
?
command
:
new
File
(
bin
,
"java"
)
);
command
=
command
.
exists
()
?
command
:
new
File
(
bin
,
"java"
);
Assert
.
state
(
command
.
exists
(),
()
->
"Unable to find java in "
+
javaHome
);
return
command
;
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java
View file @
80da9cf5
...
...
@@ -304,7 +304,7 @@ public class PropertiesLauncher extends Launcher {
for
(
String
path
:
commaSeparatedPaths
.
split
(
","
))
{
path
=
cleanupPath
(
path
);
// "" means the user wants root of archive but not current directory
path
=
(
""
.
equals
(
path
)
?
"/"
:
path
)
;
path
=
""
.
equals
(
path
)
?
"/"
:
path
;
paths
.
add
(
path
);
}
if
(
paths
.
isEmpty
())
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/Handler.java
View file @
80da9cf5
...
...
@@ -124,8 +124,8 @@ public class Handler extends URLStreamHandler {
private
void
log
(
boolean
warning
,
String
message
,
Exception
cause
)
{
try
{
L
ogger
.
getLogger
(
getClass
().
getName
())
.
log
((
warning
?
Level
.
WARNING
:
Level
.
FINEST
)
,
message
,
cause
);
L
evel
level
=
warning
?
Level
.
WARNING
:
Level
.
FINEST
;
Logger
.
getLogger
(
getClass
().
getName
()).
log
(
level
,
message
,
cause
);
}
catch
(
Exception
ex
)
{
if
(
warning
)
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java
View file @
80da9cf5
...
...
@@ -214,7 +214,7 @@ final class JarURLConnection extends java.net.JarURLConnection {
@Override
public
Object
getContent
()
throws
IOException
{
connect
();
return
(
this
.
jarEntryName
.
isEmpty
()
?
this
.
jarFile
:
super
.
getContent
()
);
return
this
.
jarEntryName
.
isEmpty
()
?
this
.
jarFile
:
super
.
getContent
(
);
}
@Override
...
...
@@ -386,7 +386,7 @@ final class JarURLConnection extends java.net.JarURLConnection {
private
String
deduceContentType
()
{
// Guess the content type, don't bother with streams as mark is not supported
String
type
=
(
isEmpty
()
?
"x-java/jar"
:
null
)
;
String
type
=
isEmpty
()
?
"x-java/jar"
:
null
;
type
=
(
type
!=
null
)
?
type
:
guessContentTypeFromName
(
toString
());
type
=
(
type
!=
null
)
?
type
:
"content/unknown"
;
return
type
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ImageBanner.java
View file @
80da9cf5
...
...
@@ -200,7 +200,7 @@ public class ImageBanner implements Banner {
private
void
printBanner
(
BufferedImage
image
,
int
margin
,
boolean
invert
,
PrintStream
out
)
{
AnsiElement
background
=
(
invert
?
AnsiBackground
.
BLACK
:
AnsiBackground
.
DEFAULT
)
;
AnsiElement
background
=
invert
?
AnsiBackground
.
BLACK
:
AnsiBackground
.
DEFAULT
;
out
.
print
(
AnsiOutput
.
encode
(
AnsiColor
.
DEFAULT
));
out
.
print
(
AnsiOutput
.
encode
(
background
));
out
.
println
();
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ResourceBanner.java
View file @
80da9cf5
...
...
@@ -119,7 +119,7 @@ public class ResourceBanner implements Banner {
if
(
version
==
null
)
{
return
""
;
}
return
(
format
?
" (v"
+
version
+
")"
:
version
)
;
return
format
?
" (v"
+
version
+
")"
:
version
;
}
private
PropertyResolver
getAnsiResolver
()
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplicationBannerPrinter.java
View file @
80da9cf5
...
...
@@ -99,7 +99,7 @@ class SpringApplicationBannerPrinter {
String
location
=
environment
.
getProperty
(
BANNER_IMAGE_LOCATION_PROPERTY
);
if
(
StringUtils
.
hasLength
(
location
))
{
Resource
resource
=
this
.
resourceLoader
.
getResource
(
location
);
return
(
resource
.
exists
()
?
new
ImageBanner
(
resource
)
:
null
)
;
return
resource
.
exists
()
?
new
ImageBanner
(
resource
)
:
null
;
}
for
(
String
ext
:
IMAGE_EXTENSION
)
{
Resource
resource
=
this
.
resourceLoader
.
getResource
(
"banner."
+
ext
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ContextIdApplicationContextInitializer.java
View file @
80da9cf5
...
...
@@ -66,7 +66,7 @@ public class ContextIdApplicationContextInitializer implements
private
String
getApplicationId
(
ConfigurableEnvironment
environment
)
{
String
name
=
environment
.
getProperty
(
"spring.application.name"
);
return
(
StringUtils
.
hasText
(
name
)
?
name
:
"application"
)
;
return
StringUtils
.
hasText
(
name
)
?
name
:
"application"
;
}
/**
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
View file @
80da9cf5
...
...
@@ -441,7 +441,7 @@ public class ConfigFileApplicationListener
DocumentConsumer
consumer
)
{
getSearchLocations
().
forEach
((
location
)
->
{
boolean
isFolder
=
location
.
endsWith
(
"/"
);
Set
<
String
>
names
=
(
isFolder
?
getSearchNames
()
:
NO_SEARCH_NAMES
)
;
Set
<
String
>
names
=
isFolder
?
getSearchNames
()
:
NO_SEARCH_NAMES
;
names
.
forEach
(
(
name
)
->
load
(
location
,
name
,
profile
,
filterFactory
,
consumer
));
});
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java
View file @
80da9cf5
...
...
@@ -310,7 +310,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
private
void
setLogLevel
(
LoggingSystem
system
,
String
name
,
String
level
)
{
try
{
name
=
(
name
.
equalsIgnoreCase
(
LoggingSystem
.
ROOT_LOGGER_NAME
)
?
null
:
name
)
;
name
=
name
.
equalsIgnoreCase
(
LoggingSystem
.
ROOT_LOGGER_NAME
)
?
null
:
name
;
system
.
setLogLevel
(
name
,
coerceLogLevel
(
level
));
}
catch
(
RuntimeException
ex
)
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java
View file @
80da9cf5
...
...
@@ -70,7 +70,7 @@ class MapBinder extends AggregateBinder<Map<Object, Object>> {
}
new
EntryBinder
(
name
,
resolvedTarget
,
elementBinder
).
bindEntries
(
source
,
map
);
}
return
(
map
.
isEmpty
()
?
null
:
map
)
;
return
map
.
isEmpty
()
?
null
:
map
;
}
private
Bindable
<?>
resolveTarget
(
Bindable
<?>
target
)
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java
View file @
80da9cf5
...
...
@@ -319,17 +319,17 @@ public final class ConfigurationPropertyName
int
l1
=
e1
.
length
();
int
l2
=
e2
.
length
();
boolean
indexed1
=
isIndexed
(
e1
);
int
offset1
=
(
indexed1
?
1
:
0
)
;
int
offset1
=
indexed1
?
1
:
0
;
boolean
indexed2
=
isIndexed
(
e2
);
int
offset2
=
(
indexed2
?
1
:
0
)
;
int
offset2
=
indexed2
?
1
:
0
;
int
i1
=
offset1
;
int
i2
=
offset2
;
while
(
i1
<
l1
-
offset1
)
{
if
(
i2
>=
l2
-
offset2
)
{
return
false
;
}
char
ch1
=
(
indexed1
?
e1
.
charAt
(
i1
)
:
Character
.
toLowerCase
(
e1
.
charAt
(
i1
)
));
char
ch2
=
(
indexed2
?
e2
.
charAt
(
i2
)
:
Character
.
toLowerCase
(
e2
.
charAt
(
i2
)
));
char
ch1
=
indexed1
?
e1
.
charAt
(
i1
)
:
Character
.
toLowerCase
(
e1
.
charAt
(
i1
));
char
ch2
=
indexed2
?
e2
.
charAt
(
i2
)
:
Character
.
toLowerCase
(
e2
.
charAt
(
i2
));
if
(
ch1
==
'-'
||
ch1
==
'_'
)
{
i1
++;
}
...
...
@@ -372,7 +372,7 @@ public final class ConfigurationPropertyName
private
int
getElementHashCode
(
CharSequence
element
)
{
int
hash
=
0
;
boolean
indexed
=
isIndexed
(
element
);
int
offset
=
(
indexed
?
1
:
0
)
;
int
offset
=
indexed
?
1
:
0
;
for
(
int
i
=
0
+
offset
;
i
<
element
.
length
()
-
offset
;
i
++)
{
char
ch
=
(
indexed
?
element
.
charAt
(
i
)
:
Character
.
toLowerCase
(
element
.
charAt
(
i
)));
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/FilteredConfigurationPropertiesSource.java
View file @
80da9cf5
...
...
@@ -44,7 +44,7 @@ class FilteredConfigurationPropertiesSource implements ConfigurationPropertySour
public
ConfigurationProperty
getConfigurationProperty
(
ConfigurationPropertyName
name
)
{
boolean
filtered
=
getFilter
().
test
(
name
);
return
(
filtered
?
getSource
().
getConfigurationProperty
(
name
)
:
null
)
;
return
filtered
?
getSource
().
getConfigurationProperty
(
name
)
:
null
;
}
@Override
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SystemEnvironmentPropertyMapper.java
View file @
80da9cf5
...
...
@@ -100,7 +100,7 @@ final class SystemEnvironmentPropertyMapper implements PropertyMapper {
private
CharSequence
processElementValue
(
CharSequence
value
)
{
String
result
=
value
.
toString
().
toLowerCase
(
Locale
.
ENGLISH
);
return
(
isNumber
(
result
)
?
"["
+
result
+
"]"
:
result
)
;
return
isNumber
(
result
)
?
"["
+
result
+
"]"
:
result
;
}
private
static
boolean
isNumber
(
String
string
)
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/ApplicationHome.java
View file @
80da9cf5
...
...
@@ -140,7 +140,7 @@ public class ApplicationHome {
if
(
homeDir
.
isFile
())
{
homeDir
=
homeDir
.
getParentFile
();
}
homeDir
=
(
homeDir
.
exists
()
?
homeDir
:
new
File
(
"."
)
);
homeDir
=
homeDir
.
exists
()
?
homeDir
:
new
File
(
"."
);
return
homeDir
.
getAbsoluteFile
();
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/context/ServerPortInfoApplicationContextInitializer.java
View file @
80da9cf5
...
...
@@ -67,7 +67,7 @@ public class ServerPortInfoApplicationContextInitializer
private
String
getName
(
WebServerApplicationContext
context
)
{
String
name
=
context
.
getServerNamespace
();
return
(
StringUtils
.
hasText
(
name
)
?
name
:
"server"
)
;
return
StringUtils
.
hasText
(
name
)
?
name
:
"server"
;
}
private
void
setPortProperty
(
ApplicationContext
context
,
String
propertyName
,
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatWebServer.java
View file @
80da9cf5
...
...
@@ -320,7 +320,7 @@ public class TomcatWebServer implements WebServer {
StringBuilder
ports
=
new
StringBuilder
();
for
(
Connector
connector
:
this
.
tomcat
.
getService
().
findConnectors
())
{
ports
.
append
((
ports
.
length
()
!=
0
)
?
" "
:
""
);
int
port
=
(
localPort
?
connector
.
getLocalPort
()
:
connector
.
getPort
()
);
int
port
=
localPort
?
connector
.
getLocalPort
()
:
connector
.
getPort
(
);
ports
.
append
(
port
+
" ("
+
connector
.
getScheme
()
+
")"
);
}
return
ports
.
toString
();
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletContextInitializerBeans.java
View file @
80da9cf5
...
...
@@ -178,7 +178,7 @@ public class ServletContextInitializerBeans
private
MultipartConfigElement
getMultipartConfig
(
ListableBeanFactory
beanFactory
)
{
List
<
Entry
<
String
,
MultipartConfigElement
>>
beans
=
getOrderedBeansOfType
(
beanFactory
,
MultipartConfigElement
.
class
);
return
(
beans
.
isEmpty
()
?
null
:
beans
.
get
(
0
).
getValue
()
);
return
beans
.
isEmpty
()
?
null
:
beans
.
get
(
0
).
getValue
(
);
}
protected
<
T
>
void
addAsRegistrationBean
(
ListableBeanFactory
beanFactory
,
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java
View file @
80da9cf5
...
...
@@ -712,7 +712,7 @@ public abstract class AbstractServletWebServerFactoryTests {
}
private
String
getStoreType
(
String
keyStore
)
{
return
(
keyStore
.
endsWith
(
".p12"
)
?
"pkcs12"
:
null
)
;
return
keyStore
.
endsWith
(
".p12"
)
?
"pkcs12"
:
null
;
}
@Test
...
...
spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java
View file @
80da9cf5
...
...
@@ -42,7 +42,7 @@ public class ChatService {
@Disconnect
public
void
onDisconnect
(
AtmosphereResourceEvent
event
)
{
this
.
logger
.
info
(
"Client {} disconnected [{}]"
,
event
.
getResource
().
uuid
(),
(
event
.
isCancelled
()
?
"cancelled"
:
"closed"
)
);
event
.
isCancelled
()
?
"cancelled"
:
"closed"
);
}
@org
.
atmosphere
.
config
.
service
.
Message
(
encoders
=
JacksonEncoderDecoder
.
class
,
decoders
=
JacksonEncoderDecoder
.
class
)
...
...
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