Correct two equality checks on incomparable types (#27688)
This commit is contained in:
parent
ee21045697
commit
057efea893
|
@ -369,7 +369,7 @@ public class GeoShapeFieldMapper extends FieldMapper {
|
|||
public void setStrategyName(String strategyName) {
|
||||
checkIfFrozen();
|
||||
this.strategyName = strategyName;
|
||||
if (this.strategyName.equals(SpatialStrategy.TERM)) {
|
||||
if (this.strategyName.equals(SpatialStrategy.TERM.getStrategyName())) {
|
||||
this.pointsOnly = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -768,7 +768,7 @@ public final class Definition {
|
|||
painlessConstructor = new Method("<init>", ownerStruct, null, getTypeInternal("void"), painlessParametersTypes,
|
||||
asmConstructor, javaConstructor.getModifiers(), javaHandle);
|
||||
ownerStruct.constructors.put(painlessMethodKey, painlessConstructor);
|
||||
} else if (painlessConstructor.equals(painlessParametersTypes) == false){
|
||||
} else if (painlessConstructor.arguments.equals(painlessParametersTypes) == false){
|
||||
throw new IllegalArgumentException(
|
||||
"illegal duplicate constructors [" + painlessMethodKey + "] found within the struct [" + ownerStruct.name + "] " +
|
||||
"with parameters " + painlessParametersTypes + " and " + painlessConstructor.arguments);
|
||||
|
|
Loading…
Reference in New Issue