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
7ee36561
Commit
7ee36561
authored
Aug 26, 2019
by
Kant
Committed by
Stephane Nicoll
Aug 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
See gh-17962
parent
2726540e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
23 deletions
+13
-23
AutoConfigurationSorter.java
...framework/boot/autoconfigure/AutoConfigurationSorter.java
+2
-2
ImportAutoConfigurationImportSelector.java
.../autoconfigure/ImportAutoConfigurationImportSelector.java
+2
-2
OnBeanCondition.java
...amework/boot/autoconfigure/condition/OnBeanCondition.java
+2
-6
GroovyTemplateAutoConfiguration.java
...gure/groovy/template/GroovyTemplateAutoConfiguration.java
+1
-4
ParentAwareNamingStrategy.java
...ork/boot/autoconfigure/jmx/ParentAwareNamingStrategy.java
+3
-2
DataSourceInitializedPublisher.java
...autoconfigure/orm/jpa/DataSourceInitializedPublisher.java
+1
-4
AutoConfigurationSorterTests.java
...work/boot/autoconfigure/AutoConfigurationSorterTests.java
+2
-3
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationSorter.java
View file @
7ee36561
...
@@ -136,8 +136,8 @@ class AutoConfigurationSorter {
...
@@ -136,8 +136,8 @@ class AutoConfigurationSorter {
}
}
Set
<
String
>
getClassesRequestedAfter
(
String
className
)
{
Set
<
String
>
getClassesRequestedAfter
(
String
className
)
{
Set
<
String
>
classesRequestedAfter
=
new
LinkedHashSet
<>
();
Set
<
String
>
setOfClassesRequestedAfter
=
get
(
className
).
getAfter
();
classesRequestedAfter
.
addAll
(
get
(
className
).
getAfter
()
);
Set
<
String
>
classesRequestedAfter
=
new
LinkedHashSet
<>(
setOfClassesRequestedAfter
);
this
.
classes
.
forEach
((
name
,
autoConfigurationClass
)
->
{
this
.
classes
.
forEach
((
name
,
autoConfigurationClass
)
->
{
if
(
autoConfigurationClass
.
getBefore
().
contains
(
className
))
{
if
(
autoConfigurationClass
.
getBefore
().
contains
(
className
))
{
classesRequestedAfter
.
add
(
name
);
classesRequestedAfter
.
add
(
name
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelector.java
View file @
7ee36561
...
@@ -58,8 +58,8 @@ class ImportAutoConfigurationImportSelector extends AutoConfigurationImportSelec
...
@@ -58,8 +58,8 @@ class ImportAutoConfigurationImportSelector extends AutoConfigurationImportSelec
@Override
@Override
public
Set
<
Object
>
determineImports
(
AnnotationMetadata
metadata
)
{
public
Set
<
Object
>
determineImports
(
AnnotationMetadata
metadata
)
{
Set
<
String
>
result
=
new
LinkedHashSet
<>(
);
List
<
String
>
candidateConfigurations
=
getCandidateConfigurations
(
metadata
,
null
);
result
.
addAll
(
getCandidateConfigurations
(
metadata
,
null
)
);
Set
<
String
>
result
=
new
LinkedHashSet
<>(
candidateConfigurations
);
result
.
removeAll
(
getExclusions
(
metadata
,
null
));
result
.
removeAll
(
getExclusions
(
metadata
,
null
));
return
Collections
.
unmodifiableSet
(
result
);
return
Collections
.
unmodifiableSet
(
result
);
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java
View file @
7ee36561
...
@@ -376,9 +376,7 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
...
@@ -376,9 +376,7 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
return
result
;
return
result
;
}
}
result
=
(
result
!=
null
)
?
result
:
new
LinkedHashSet
<>();
result
=
(
result
!=
null
)
?
result
:
new
LinkedHashSet
<>();
for
(
String
addition
:
additional
)
{
Collections
.
addAll
(
result
,
additional
);
result
.
add
(
addition
);
}
return
result
;
return
result
;
}
}
...
@@ -454,9 +452,7 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
...
@@ -454,9 +452,7 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
}
}
private
void
merge
(
Set
<
String
>
result
,
String
...
additional
)
{
private
void
merge
(
Set
<
String
>
result
,
String
...
additional
)
{
for
(
String
addition
:
additional
)
{
Collections
.
addAll
(
result
,
additional
);
result
.
add
(
addition
);
}
}
}
private
Set
<
Class
<?>>
resolveWhenPossible
(
Set
<
String
>
classNames
)
{
private
Set
<
Class
<?>>
resolveWhenPossible
(
Set
<
String
>
classNames
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration.java
View file @
7ee36561
...
@@ -102,10 +102,7 @@ public class GroovyTemplateAutoConfiguration {
...
@@ -102,10 +102,7 @@ public class GroovyTemplateAutoConfiguration {
try
{
try
{
ProtectionDomain
domain
=
MarkupTemplateEngine
.
class
.
getProtectionDomain
();
ProtectionDomain
domain
=
MarkupTemplateEngine
.
class
.
getProtectionDomain
();
CodeSource
codeSource
=
domain
.
getCodeSource
();
CodeSource
codeSource
=
domain
.
getCodeSource
();
if
(
codeSource
!=
null
&&
codeSource
.
getLocation
().
toString
().
contains
(
"-all"
))
{
return
codeSource
!=
null
&&
codeSource
.
getLocation
().
toString
().
contains
(
"-all"
);
return
true
;
}
return
false
;
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
return
false
;
return
false
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/ParentAwareNamingStrategy.java
View file @
7ee36561
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
jmx
;
package
org
.
springframework
.
boot
.
autoconfigure
.
jmx
;
import
java.util.Hashtable
;
import
java.util.Hashtable
;
import
java.util.Map
;
import
javax.management.MalformedObjectNameException
;
import
javax.management.MalformedObjectNameException
;
import
javax.management.ObjectName
;
import
javax.management.ObjectName
;
...
@@ -57,8 +58,8 @@ public class ParentAwareNamingStrategy extends MetadataNamingStrategy implements
...
@@ -57,8 +58,8 @@ public class ParentAwareNamingStrategy extends MetadataNamingStrategy implements
@Override
@Override
public
ObjectName
getObjectName
(
Object
managedBean
,
String
beanKey
)
throws
MalformedObjectNameException
{
public
ObjectName
getObjectName
(
Object
managedBean
,
String
beanKey
)
throws
MalformedObjectNameException
{
ObjectName
name
=
super
.
getObjectName
(
managedBean
,
beanKey
);
ObjectName
name
=
super
.
getObjectName
(
managedBean
,
beanKey
);
Hashtable
<
String
,
String
>
properties
=
new
Hashtable
<>
();
Map
<
String
,
String
>
keyPropertyList
=
name
.
getKeyPropertyList
();
properties
.
putAll
(
name
.
getKeyPropertyList
()
);
Hashtable
<
String
,
String
>
properties
=
new
Hashtable
<>(
keyPropertyList
);
if
(
this
.
ensureUniqueRuntimeObjectNames
)
{
if
(
this
.
ensureUniqueRuntimeObjectNames
)
{
properties
.
put
(
"identity"
,
ObjectUtils
.
getIdentityHexString
(
managedBean
));
properties
.
put
(
"identity"
,
ObjectUtils
.
getIdentityHexString
(
managedBean
));
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/DataSourceInitializedPublisher.java
View file @
7ee36561
...
@@ -112,10 +112,7 @@ class DataSourceInitializedPublisher implements BeanPostProcessor {
...
@@ -112,10 +112,7 @@ class DataSourceInitializedPublisher implements BeanPostProcessor {
:
"none"
);
:
"none"
);
Map
<
String
,
Object
>
hibernate
=
this
.
hibernateProperties
.
determineHibernateProperties
(
Map
<
String
,
Object
>
hibernate
=
this
.
hibernateProperties
.
determineHibernateProperties
(
this
.
jpaProperties
.
getProperties
(),
new
HibernateSettings
().
ddlAuto
(
defaultDdlAuto
));
this
.
jpaProperties
.
getProperties
(),
new
HibernateSettings
().
ddlAuto
(
defaultDdlAuto
));
if
(
hibernate
.
containsKey
(
"hibernate.hbm2ddl.auto"
))
{
return
hibernate
.
containsKey
(
"hibernate.hbm2ddl.auto"
);
return
true
;
}
return
false
;
}
}
/**
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationSorterTests.java
View file @
7ee36561
...
@@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure;
...
@@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.LinkedHashSet
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Properties
;
import
java.util.Properties
;
...
@@ -192,9 +193,7 @@ class AutoConfigurationSorterTests {
...
@@ -192,9 +193,7 @@ class AutoConfigurationSorterTests {
for
(
Class
<?>
type
:
value
)
{
for
(
Class
<?>
type
:
value
)
{
items
.
add
(
type
.
getName
());
items
.
add
(
type
.
getName
());
}
}
for
(
String
type
:
name
)
{
Collections
.
addAll
(
items
,
name
);
items
.
add
(
type
);
}
return
StringUtils
.
collectionToCommaDelimitedString
(
items
);
return
StringUtils
.
collectionToCommaDelimitedString
(
items
);
}
}
...
...
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