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
b8706c47
Commit
b8706c47
authored
Jan 07, 2018
by
Johnny Lim
Committed by
Stephane Nicoll
Jan 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use instance equality for Class
Closes gh-11534
parent
b5a4edc9
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
18 deletions
+18
-18
AutoConfigurationImportSelector.java
...k/boot/autoconfigure/AutoConfigurationImportSelector.java
+2
-2
TypeExcludeFiltersContextCustomizer.java
...configure/filter/TypeExcludeFiltersContextCustomizer.java
+2
-2
PropertyMappingContextCustomizer.java
...onfigure/properties/PropertyMappingContextCustomizer.java
+2
-2
TypeExcludeFiltersContextCustomizerFactoryTests.java
...lter/TypeExcludeFiltersContextCustomizerFactoryTests.java
+2
-2
ExampleBasicObject.java
.../boot/test/autoconfigure/json/app/ExampleBasicObject.java
+2
-2
ExampleCustomObject.java
...boot/test/autoconfigure/json/app/ExampleCustomObject.java
+2
-2
ImportsContextCustomizer.java
...framework/boot/test/context/ImportsContextCustomizer.java
+2
-2
TestPropertyValues.java
...rg/springframework/boot/test/util/TestPropertyValues.java
+2
-2
TypeExcludeFilter.java
...a/org/springframework/boot/context/TypeExcludeFilter.java
+2
-2
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -108,7 +108,7 @@ public class AutoConfigurationImportSelector
}
protected
boolean
isEnabled
(
AnnotationMetadata
metadata
)
{
if
(
getClass
()
.
equals
(
AutoConfigurationImportSelector
.
class
)
)
{
if
(
getClass
()
==
AutoConfigurationImportSelector
.
class
)
{
return
getEnvironment
().
getProperty
(
EnableAutoConfiguration
.
ENABLED_OVERRIDE_PROPERTY
,
Boolean
.
class
,
true
);
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/TypeExcludeFiltersContextCustomizer.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -80,7 +80,7 @@ class TypeExcludeFiltersContextCustomizer implements ContextCustomizer {
@Override
public
boolean
equals
(
Object
obj
)
{
return
(
obj
!=
null
&&
getClass
()
.
equals
(
obj
.
getClass
()
)
&&
this
.
filters
return
(
obj
!=
null
&&
getClass
()
==
obj
.
getClass
(
)
&&
this
.
filters
.
equals
(((
TypeExcludeFiltersContextCustomizer
)
obj
).
filters
));
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingContextCustomizer.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -62,7 +62,7 @@ class PropertyMappingContextCustomizer implements ContextCustomizer {
@Override
public
boolean
equals
(
Object
obj
)
{
return
(
obj
!=
null
&&
getClass
()
.
equals
(
obj
.
getClass
()
)
&&
this
.
propertySource
return
(
obj
!=
null
&&
getClass
()
==
obj
.
getClass
(
)
&&
this
.
propertySource
.
equals
(((
PropertyMappingContextCustomizer
)
obj
).
propertySource
));
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/filter/TypeExcludeFiltersContextCustomizerFactoryTests.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -125,7 +125,7 @@ public class TypeExcludeFiltersContextCustomizerFactoryTests {
@Override
public
boolean
equals
(
Object
obj
)
{
return
obj
.
getClass
()
.
equals
(
getClass
()
);
return
obj
.
getClass
()
==
getClass
(
);
}
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/app/ExampleBasicObject.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -40,7 +40,7 @@ public class ExampleBasicObject {
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
!=
null
&&
obj
.
getClass
()
.
equals
(
getClass
()
))
{
if
(
obj
!=
null
&&
obj
.
getClass
()
==
getClass
(
))
{
return
this
.
value
.
equals
(((
ExampleBasicObject
)
obj
).
value
);
}
return
false
;
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/app/ExampleCustomObject.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -36,7 +36,7 @@ public class ExampleCustomObject {
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
!=
null
&&
obj
.
getClass
()
.
equals
(
getClass
()
))
{
if
(
obj
!=
null
&&
obj
.
getClass
()
==
getClass
(
))
{
return
this
.
value
.
equals
(((
ExampleCustomObject
)
obj
).
value
);
}
return
false
;
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ImportsContextCustomizer.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -346,7 +346,7 @@ class ImportsContextCustomizer implements ContextCustomizer {
@Override
public
boolean
equals
(
Object
obj
)
{
return
(
obj
!=
null
&&
getClass
()
.
equals
(
obj
.
getClass
()
)
return
(
obj
!=
null
&&
getClass
()
==
obj
.
getClass
(
)
&&
this
.
key
.
equals
(((
ContextCustomizerKey
)
obj
).
key
));
}
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/util/TestPropertyValues.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -144,7 +144,7 @@ public final class TestPropertyValues {
private
void
addToSources
(
MutablePropertySources
sources
,
Type
type
,
String
name
)
{
if
(
sources
.
contains
(
name
))
{
PropertySource
<?>
propertySource
=
sources
.
get
(
name
);
if
(
propertySource
.
getClass
()
.
equals
(
type
.
getSourceClass
()
))
{
if
(
propertySource
.
getClass
()
==
type
.
getSourceClass
(
))
{
((
Map
<
String
,
Object
>)
propertySource
.
getSource
())
.
putAll
(
this
.
properties
);
return
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/TypeExcludeFilter.java
View file @
b8706c47
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -60,7 +60,7 @@ public class TypeExcludeFilter implements TypeFilter, BeanFactoryAware {
public
boolean
match
(
MetadataReader
metadataReader
,
MetadataReaderFactory
metadataReaderFactory
)
throws
IOException
{
if
(
this
.
beanFactory
instanceof
ListableBeanFactory
&&
getClass
()
.
equals
(
TypeExcludeFilter
.
class
)
)
{
&&
getClass
()
==
TypeExcludeFilter
.
class
)
{
Collection
<
TypeExcludeFilter
>
delegates
=
((
ListableBeanFactory
)
this
.
beanFactory
)
.
getBeansOfType
(
TypeExcludeFilter
.
class
).
values
();
for
(
TypeExcludeFilter
delegate
:
delegates
)
{
...
...
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