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
56cbc65e
Commit
56cbc65e
authored
Feb 26, 2018
by
igor-suhorukov
Committed by
Stephane Nicoll
Feb 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
See gh-12236
parent
a93052f3
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
61 additions
and
77 deletions
+61
-77
BackgroundPreinitializer.java
...ramework/boot/autoconfigure/BackgroundPreinitializer.java
+3
-4
EmbeddedLdapAutoConfiguration.java
...onfigure/ldap/embedded/EmbeddedLdapAutoConfiguration.java
+4
-5
ConditionEvaluationReportLoggingListener.java
...ure/logging/ConditionEvaluationReportLoggingListener.java
+3
-4
SessionAutoConfiguration.java
.../boot/autoconfigure/session/SessionAutoConfiguration.java
+7
-8
Installer.java
...g/springframework/boot/cli/command/install/Installer.java
+3
-5
AstUtils.java
.../java/org/springframework/boot/cli/compiler/AstUtils.java
+4
-5
ResourceUtils.java
...java/org/springframework/boot/cli/util/ResourceUtils.java
+4
-5
Tree.java
...k/boot/configurationprocessor/fieldvalues/javac/Tree.java
+7
-9
JarURLConnection.java
...org/springframework/boot/loader/jar/JarURLConnection.java
+3
-4
BeanDefinitionLoader.java
...n/java/org/springframework/boot/BeanDefinitionLoader.java
+4
-6
ParentContextCloserApplicationListener.java
.../boot/builder/ParentContextCloserApplicationListener.java
+5
-6
ApplicationPidFileWriter.java
...pringframework/boot/context/ApplicationPidFileWriter.java
+11
-12
SpringBootConfigurationFactory.java
...k/boot/logging/log4j2/SpringBootConfigurationFactory.java
+3
-4
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/BackgroundPreinitializer.java
View file @
56cbc65e
...
...
@@ -56,11 +56,10 @@ public class BackgroundPreinitializer
@Override
public
void
onApplicationEvent
(
SpringApplicationEvent
event
)
{
if
(
event
instanceof
ApplicationStartingEvent
)
{
if
(
preinitializationStarted
.
compareAndSet
(
false
,
true
))
{
if
(
event
instanceof
ApplicationStartingEvent
&&
preinitializationStarted
.
compareAndSet
(
false
,
true
))
{
performPreinitialization
();
}
}
if
((
event
instanceof
ApplicationReadyEvent
||
event
instanceof
ApplicationFailedEvent
)
&&
preinitializationStarted
.
get
())
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/embedded/EmbeddedLdapAutoConfiguration.java
View file @
56cbc65e
...
...
@@ -218,14 +218,13 @@ public class EmbeddedLdapAutoConfiguration {
AnnotatedTypeMetadata
metadata
)
{
Builder
message
=
ConditionMessage
.
forCondition
(
"Embedded LDAP"
);
Environment
environment
=
context
.
getEnvironment
();
if
(
environment
!=
null
)
{
if
(
!
Binder
.
get
(
environment
)
if
(
environment
!=
null
&&
!
Binder
.
get
(
environment
)
.
bind
(
"spring.ldap.embedded.base-dn"
,
STRING_LIST
)
.
orElseGet
(
Collections:
:
emptyList
).
isEmpty
())
{
return
ConditionOutcome
.
match
(
message
.
because
(
"Found base-dn property"
));
}
}
return
ConditionOutcome
.
noMatch
(
message
.
because
(
"No base-dn property found"
));
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java
View file @
56cbc65e
...
...
@@ -74,13 +74,12 @@ public class ConditionEvaluationReportLoggingListener
logAutoConfigurationReport
();
}
}
else
if
(
event
instanceof
ApplicationFailedEvent
)
{
if
(
((
ApplicationFailedEvent
)
event
)
else
if
(
event
instanceof
ApplicationFailedEvent
&&
((
ApplicationFailedEvent
)
event
)
.
getApplicationContext
()
==
initializerApplicationContext
)
{
logAutoConfigurationReport
(
true
);
}
}
}
private
void
logAutoConfigurationReport
()
{
logAutoConfigurationReport
(!
this
.
applicationContext
.
isActive
());
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java
View file @
56cbc65e
...
...
@@ -248,8 +248,8 @@ public class SessionAutoConfiguration {
public
void
checkSessionRepository
()
{
StoreType
storeType
=
this
.
sessionProperties
.
getStoreType
();
if
(
storeType
!=
StoreType
.
NONE
&&
this
.
sessionRepositoryProvider
.
getIfAvailable
()
==
null
)
{
if
(
storeType
!=
null
)
{
&&
this
.
sessionRepositoryProvider
.
getIfAvailable
()
==
null
&&
storeType
!=
null
)
{
throw
new
SessionRepositoryUnavailableException
(
"No session repository could be auto-configured, check your "
+
"configuration (session store type is '"
...
...
@@ -257,7 +257,6 @@ public class SessionAutoConfiguration {
storeType
);
}
}
}
}
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/Installer.java
View file @
56cbc65e
...
...
@@ -147,12 +147,10 @@ class Installer {
String
home
=
SystemPropertyUtils
.
resolvePlaceholders
(
"${spring.home:${SPRING_HOME:.}}"
);
File
extDirectory
=
new
File
(
new
File
(
home
,
"lib"
),
"ext"
);
if
(!
extDirectory
.
isDirectory
())
{
if
(!
extDirectory
.
mkdirs
())
{
if
(!
extDirectory
.
isDirectory
()
&&
!
extDirectory
.
mkdirs
())
{
throw
new
IllegalStateException
(
"Failed to create ext directory "
+
extDirectory
);
}
}
return
extDirectory
;
}
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java
View file @
56cbc65e
...
...
@@ -179,12 +179,11 @@ public abstract class AstUtils {
private
static
ClosureExpression
getClosure
(
String
name
,
MethodCallExpression
expression
)
{
Expression
method
=
expression
.
getMethod
();
if
(
method
instanceof
ConstantExpression
)
{
if
(
name
.
equals
(((
ConstantExpression
)
method
).
getValue
()))
{
if
(
method
instanceof
ConstantExpression
&&
name
.
equals
(((
ConstantExpression
)
method
).
getValue
()))
{
return
(
ClosureExpression
)
((
ArgumentListExpression
)
expression
.
getArguments
()).
getExpression
(
0
);
}
}
return
null
;
}
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/util/ResourceUtils.java
View file @
56cbc65e
...
...
@@ -103,12 +103,11 @@ public abstract class ResourceUtils {
List
<
String
>
result
=
new
ArrayList
<>();
for
(
Resource
resource
:
resources
)
{
if
(
resource
.
exists
())
{
if
(
resource
.
getURI
().
getScheme
().
equals
(
"file"
)
)
{
if
(
resource
.
getFile
().
isDirectory
())
{
if
(
resource
.
getURI
().
getScheme
().
equals
(
"file"
)
&&
resource
.
getFile
().
isDirectory
())
{
result
.
addAll
(
getChildFiles
(
resource
));
continue
;
}
}
result
.
add
(
absolutePath
(
resource
));
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/Tree.java
View file @
56cbc65e
...
...
@@ -63,8 +63,7 @@ class Tree extends ReflectionWrapper {
@SuppressWarnings
(
"rawtypes"
)
public
Object
invoke
(
Object
proxy
,
Method
method
,
Object
[]
args
)
throws
Throwable
{
if
(
method
.
getName
().
equals
(
"visitClass"
))
{
if
((
Integer
)
args
[
1
]
==
0
)
{
if
(
method
.
getName
().
equals
(
"visitClass"
)
&&
(
Integer
)
args
[
1
]
==
0
)
{
Iterable
members
=
(
Iterable
)
Tree
.
this
.
getClassTreeMembers
.
invoke
(
args
[
0
]);
for
(
Object
member
:
members
)
{
...
...
@@ -74,7 +73,6 @@ class Tree extends ReflectionWrapper {
}
}
}
}
if
(
method
.
getName
().
equals
(
"visitVariable"
))
{
this
.
treeVisitor
.
visitVariable
(
new
VariableTree
(
args
[
0
]));
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java
View file @
56cbc65e
...
...
@@ -266,12 +266,11 @@ final class JarURLConnection extends java.net.JarURLConnection {
index
=
separator
+
SEPARATOR
.
length
();
}
JarEntryName
jarEntryName
=
JarEntryName
.
get
(
spec
,
index
);
if
(
Boolean
.
TRUE
.
equals
(
useFastExceptions
.
get
())
)
{
if
(
!
jarEntryName
.
isEmpty
()
if
(
Boolean
.
TRUE
.
equals
(
useFastExceptions
.
get
())
&&
!
jarEntryName
.
isEmpty
()
&&
!
jarFile
.
containsEntry
(
jarEntryName
.
toString
()))
{
return
NOT_FOUND_CONNECTION
;
}
}
return
new
JarURLConnection
(
url
,
jarFile
,
jarEntryName
);
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java
View file @
56cbc65e
...
...
@@ -147,14 +147,12 @@ class BeanDefinitionLoader {
}
private
int
load
(
Class
<?>
source
)
{
if
(
isGroovyPresent
())
{
if
(
isGroovyPresent
()
&&
GroovyBeanDefinitionSource
.
class
.
isAssignableFrom
(
source
)
)
{
// Any GroovyLoaders added in beans{} DSL can contribute beans here
if
(
GroovyBeanDefinitionSource
.
class
.
isAssignableFrom
(
source
))
{
GroovyBeanDefinitionSource
loader
=
BeanUtils
.
instantiateClass
(
source
,
GroovyBeanDefinitionSource
.
class
);
load
(
loader
);
}
}
if
(
isComponent
(
source
))
{
this
.
annotatedReader
.
register
(
source
);
return
1
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/ParentContextCloserApplicationListener.java
View file @
56cbc65e
...
...
@@ -60,14 +60,13 @@ public class ParentContextCloserApplicationListener
}
private
void
maybeInstallListenerInParent
(
ConfigurableApplicationContext
child
)
{
if
(
child
==
this
.
context
)
{
if
(
child
.
getParent
()
instanceof
ConfigurableApplicationContext
)
{
if
(
child
==
this
.
context
&&
child
.
getParent
()
instanceof
ConfigurableApplicationContext
)
{
ConfigurableApplicationContext
parent
=
(
ConfigurableApplicationContext
)
child
.
getParent
();
parent
.
addApplicationListener
(
createContextCloserListener
(
child
));
}
}
}
/**
* Subclasses may override to create their own subclass of ContextCloserListener. This
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ApplicationPidFileWriter.java
View file @
56cbc65e
...
...
@@ -136,8 +136,8 @@ public class ApplicationPidFileWriter
@Override
public
void
onApplicationEvent
(
SpringApplicationEvent
event
)
{
if
(
this
.
triggerEventType
.
isInstance
(
event
)
)
{
if
(
created
.
compareAndSet
(
false
,
true
))
{
if
(
this
.
triggerEventType
.
isInstance
(
event
)
&&
created
.
compareAndSet
(
false
,
true
))
{
try
{
writePidFile
(
event
);
}
...
...
@@ -151,7 +151,6 @@ public class ApplicationPidFileWriter
}
}
}
}
private
void
writePidFile
(
SpringApplicationEvent
event
)
throws
IOException
{
File
pidFile
=
this
.
file
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/SpringBootConfigurationFactory.java
View file @
56cbc65e
...
...
@@ -51,11 +51,10 @@ public class SpringBootConfigurationFactory extends ConfigurationFactory {
@Override
public
Configuration
getConfiguration
(
LoggerContext
loggerContext
,
ConfigurationSource
source
)
{
if
(
source
!=
null
&&
source
!=
ConfigurationSource
.
NULL_SOURCE
)
{
if
(
LoggingSystem
.
get
(
loggerContext
.
getClass
().
getClassLoader
())
!=
null
)
{
if
(
source
!=
null
&&
source
!=
ConfigurationSource
.
NULL_SOURCE
&&
LoggingSystem
.
get
(
loggerContext
.
getClass
().
getClassLoader
())
!=
null
)
{
return
new
DefaultConfiguration
();
}
}
return
null
;
}
...
...
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