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
cafe1dc4
Commit
cafe1dc4
authored
Jan 25, 2016
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish contribution
Fix additional use of \n Closes gh-4707
parent
e0ec6077
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
50 additions
and
48 deletions
+50
-48
ShellProperties.java
...framework/boot/actuate/autoconfigure/ShellProperties.java
+4
-3
AutoConfigurationReportLoggingInitializer.java
...re/logging/AutoConfigurationReportLoggingInitializer.java
+27
-26
AuthenticationManagerConfiguration.java
...onfigure/security/AuthenticationManagerConfiguration.java
+3
-3
OAuth2AuthorizationServerConfiguration.java
...h2/authserver/OAuth2AuthorizationServerConfiguration.java
+1
-1
CommandRunner.java
...a/org/springframework/boot/cli/command/CommandRunner.java
+1
-1
Shell.java
...ava/org/springframework/boot/cli/command/shell/Shell.java
+2
-2
DependencyManagementBomTransformation.java
...t/cli/compiler/DependencyManagementBomTransformation.java
+3
-3
PropertiesConfigurationFactory.java
...ngframework/boot/bind/PropertiesConfigurationFactory.java
+2
-2
YamlConfigurationFactory.java
...g/springframework/boot/bind/YamlConfigurationFactory.java
+2
-2
ConfigurationWarningsApplicationContextInitializer.java
...t/ConfigurationWarningsApplicationContextInitializer.java
+2
-2
LogbackLoggingSystem.java
...gframework/boot/logging/logback/LogbackLoggingSystem.java
+3
-3
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java
View file @
cafe1dc4
/*
* Copyright 201
3-2015
the original author or authors.
* Copyright 201
2-2016
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -429,8 +429,9 @@ public class ShellProperties {
config
.
put
(
"crash.auth.simple.username"
,
this
.
user
.
getName
());
config
.
put
(
"crash.auth.simple.password"
,
this
.
user
.
getPassword
());
if
(
this
.
user
.
isDefaultPassword
())
{
logger
.
info
(
"\n\nUsing default password for shell access: "
+
this
.
user
.
getPassword
()
+
"\n\n"
);
logger
.
info
(
String
.
format
(
"%n%nUsing default password for shell access: %s%n%n"
,
this
.
user
.
getPassword
()));
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -109,9 +109,9 @@ public class AutoConfigurationReportLoggingInitializer
if
(!
this
.
report
.
getConditionAndOutcomesBySource
().
isEmpty
())
{
if
(
isCrashReport
&&
this
.
logger
.
isInfoEnabled
()
&&
!
this
.
logger
.
isDebugEnabled
())
{
this
.
logger
.
info
(
"\n\
nError starting ApplicationContext. "
this
.
logger
.
info
(
String
.
format
(
"%n%
nError starting ApplicationContext. "
+
"To display the auto-configuration report enable "
+
"debug logging (start with --debug)
\n\n"
);
+
"debug logging (start with --debug)
%n%n"
)
);
}
if
(
this
.
logger
.
isDebugEnabled
())
{
this
.
logger
.
debug
(
getLogMessage
(
this
.
report
));
...
...
@@ -121,12 +121,12 @@ public class AutoConfigurationReportLoggingInitializer
private
StringBuilder
getLogMessage
(
ConditionEvaluationReport
report
)
{
StringBuilder
message
=
new
StringBuilder
();
message
.
append
(
"\n\n\n"
);
message
.
append
(
"=========================\n"
);
message
.
append
(
"AUTO-CONFIGURATION REPORT\n"
);
message
.
append
(
"=========================\n\n\n"
);
message
.
append
(
"Positive matches:\n"
);
message
.
append
(
"-----------------\n"
);
message
.
append
(
String
.
format
(
"%n%n%n"
)
);
message
.
append
(
String
.
format
(
"=========================%n"
)
);
message
.
append
(
String
.
format
(
"AUTO-CONFIGURATION REPORT%n"
)
);
message
.
append
(
String
.
format
(
"=========================%n%n%n"
)
);
message
.
append
(
String
.
format
(
"Positive matches:%n"
)
);
message
.
append
(
String
.
format
(
"-----------------%n"
)
);
Map
<
String
,
ConditionAndOutcomes
>
shortOutcomes
=
orderByName
(
report
.
getConditionAndOutcomesBySource
());
for
(
Map
.
Entry
<
String
,
ConditionAndOutcomes
>
entry
:
shortOutcomes
.
entrySet
())
{
...
...
@@ -134,37 +134,37 @@ public class AutoConfigurationReportLoggingInitializer
addLogMessage
(
message
,
entry
.
getKey
(),
entry
.
getValue
());
}
}
message
.
append
(
"\n\n"
);
message
.
append
(
"Negative matches:\n"
);
message
.
append
(
"-----------------\n"
);
message
.
append
(
String
.
format
(
"%n%n"
)
);
message
.
append
(
String
.
format
(
"Negative matches:%n"
)
);
message
.
append
(
String
.
format
(
"-----------------%n"
)
);
for
(
Map
.
Entry
<
String
,
ConditionAndOutcomes
>
entry
:
shortOutcomes
.
entrySet
())
{
if
(!
entry
.
getValue
().
isFullMatch
())
{
addLogMessage
(
message
,
entry
.
getKey
(),
entry
.
getValue
());
}
}
message
.
append
(
"\n\n"
);
message
.
append
(
"Exclusions:\n"
);
message
.
append
(
"-----------\n"
);
message
.
append
(
String
.
format
(
"%n%n"
)
);
message
.
append
(
String
.
format
(
"Exclusions:%n"
)
);
message
.
append
(
String
.
format
(
"-----------%n"
)
);
if
(
report
.
getExclusions
().
isEmpty
())
{
message
.
append
(
"\n None\n"
);
message
.
append
(
String
.
format
(
"%n None%n"
)
);
}
else
{
for
(
String
exclusion
:
report
.
getExclusions
())
{
message
.
append
(
"\n "
+
exclusion
+
"\n"
);
message
.
append
(
String
.
format
(
"%n %s%n"
,
exclusion
)
);
}
}
message
.
append
(
"\n\n"
);
message
.
append
(
"Unconditional classes:\n"
);
message
.
append
(
"----------------------\n"
);
message
.
append
(
String
.
format
(
"%n%n"
)
);
message
.
append
(
String
.
format
(
"Unconditional classes:%n"
)
);
message
.
append
(
String
.
format
(
"----------------------%n"
)
);
if
(
report
.
getUnconditionalClasses
().
isEmpty
())
{
message
.
append
(
"\n None\n"
);
message
.
append
(
String
.
format
(
"%n None%n"
)
);
}
else
{
for
(
String
unconditionalClass
:
report
.
getUnconditionalClasses
())
{
message
.
append
(
"\n "
+
unconditionalClass
+
"\n"
);
message
.
append
(
String
.
format
(
"%n %s%n"
,
unconditionalClass
)
);
}
}
message
.
append
(
"\n\n"
);
message
.
append
(
String
.
format
(
"%n%n"
)
);
return
message
;
}
...
...
@@ -187,9 +187,10 @@ public class AutoConfigurationReportLoggingInitializer
private
void
addLogMessage
(
StringBuilder
message
,
String
source
,
ConditionAndOutcomes
conditionAndOutcomes
)
{
message
.
append
(
"\n "
+
source
);
message
.
append
(
String
.
format
(
"%n %s"
,
source
)
);
message
.
append
(
conditionAndOutcomes
.
isFullMatch
()
?
" matched\n"
:
" did not match\n"
);
conditionAndOutcomes
.
isFullMatch
()
?
" matched"
:
" did not match"
)
.
append
(
String
.
format
(
"%n"
));
for
(
ConditionAndOutcome
conditionAndOutcome
:
conditionAndOutcomes
)
{
message
.
append
(
" - "
);
if
(
StringUtils
.
hasLength
(
conditionAndOutcome
.
getOutcome
().
getMessage
()))
{
...
...
@@ -202,7 +203,7 @@ public class AutoConfigurationReportLoggingInitializer
message
.
append
(
" ("
);
message
.
append
(
ClassUtils
.
getShortName
(
conditionAndOutcome
.
getCondition
().
getClass
()));
message
.
append
(
")\n"
);
message
.
append
(
String
.
format
(
")%n"
)
);
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfiguration.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -167,8 +167,8 @@ public class AuthenticationManagerConfiguration {
}
User
user
=
this
.
securityProperties
.
getUser
();
if
(
user
.
isDefaultPassword
())
{
logger
.
info
(
"\n\nUsing default security password: "
+
user
.
getPassword
()
+
"\n"
);
logger
.
info
(
String
.
format
(
"%n%nUsing default security password: %s%n"
,
user
.
getPassword
())
);
}
Set
<
String
>
roles
=
new
LinkedHashSet
<
String
>(
user
.
getRole
());
withUser
(
user
.
getName
()).
password
(
user
.
getPassword
())
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/authserver/OAuth2AuthorizationServerConfiguration.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java
View file @
cafe1dc4
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -181,7 +181,7 @@ public class Shell {
if
(
this
.
commandRunner
.
handleSigInt
())
{
return
;
}
System
.
out
.
println
(
"\nThanks for using Spring Boot"
);
System
.
out
.
println
(
String
.
format
(
"%nThanks for using Spring Boot"
)
);
System
.
exit
(
1
);
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyManagementBomTransformation.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -159,8 +159,8 @@ public class DependencyManagementBomTransformation
}
private
void
handleMalformedDependency
(
Expression
expression
)
{
Message
message
=
createSyntaxErrorMessage
(
"The string must be of the form \"group:module:version\"
\n"
,
expression
);
Message
message
=
createSyntaxErrorMessage
(
String
.
format
(
"The string must be of the form \"group:module:version\"
%n"
)
,
expression
);
getSourceUnit
().
getErrorCollector
().
addErrorAndContinue
(
message
);
}
...
...
spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -231,7 +231,7 @@ public class PropertiesConfigurationFactory<T>
try
{
if
(
this
.
logger
.
isTraceEnabled
())
{
if
(
this
.
properties
!=
null
)
{
this
.
logger
.
trace
(
"Properties:\n"
+
this
.
properties
);
this
.
logger
.
trace
(
String
.
format
(
"Properties:%n%s"
+
this
.
properties
)
);
}
else
{
this
.
logger
.
trace
(
"Property Sources: "
+
this
.
propertySources
);
...
...
spring-boot/src/main/java/org/springframework/boot/bind/YamlConfigurationFactory.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -138,7 +138,7 @@ public class YamlConfigurationFactory<T>
+
"either set it directly or set the resource to load it from"
);
try
{
if
(
this
.
logger
.
isTraceEnabled
())
{
this
.
logger
.
trace
(
"Yaml document is\n"
+
this
.
yaml
);
this
.
logger
.
trace
(
String
.
format
(
"Yaml document is %n%s"
+
this
.
yaml
)
);
}
Constructor
constructor
=
new
YamlJavaBeanPropertyConstructor
(
this
.
type
,
this
.
propertyAliases
);
...
...
spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java
View file @
cafe1dc4
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -105,7 +105,7 @@ public class ConfigurationWarningsApplicationContextInitializer
private
void
warn
(
String
message
)
{
if
(
logger
.
isWarnEnabled
())
{
logger
.
warn
(
"\n\n** WARNING ** : "
+
message
+
"\n\n"
);
logger
.
warn
(
String
.
format
(
"%n%n** WARNING ** : %s%n%n"
,
message
)
);
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java
View file @
cafe1dc4
...
...
@@ -145,13 +145,13 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
StringBuilder
errors
=
new
StringBuilder
();
for
(
Status
status
:
statuses
)
{
if
(
status
.
getLevel
()
==
Status
.
ERROR
)
{
errors
.
append
(
errors
.
length
()
>
0
?
"\n"
:
""
);
errors
.
append
(
errors
.
length
()
>
0
?
String
.
format
(
"%n"
)
:
""
);
errors
.
append
(
status
.
toString
());
}
}
if
(
errors
.
length
()
>
0
)
{
throw
new
IllegalStateException
(
"Logback configuration error
"
+
"detected: \n"
+
errors
);
throw
new
IllegalStateException
(
String
.
format
(
"Logback configuration error
detected: %n%s"
,
errors
)
);
}
}
...
...
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