Use instance equality for Class
Closes gh-11534
This commit is contained in:
committed by
Stephane Nicoll
parent
b5a4edc9e8
commit
b8706c47d6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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;
|
||||
|
||||
Reference in New Issue
Block a user