in rest-api/src/jetbrains/buildServer/server/rest/model/Property.java [252:291]
public boolean isSimilar(final Parameter parameter, final ServiceLocator serviceLocator) {
if (parameter == null) {
return false;
}
if (!Objects.equal(name, parameter.getName())) {
return false;
}
ControlDescription controlDescription = parameter.getControlDescription();
if (inherited == null || !inherited) {
if (!Objects.equal(type, controlDescription == null ? null : new ParameterType(controlDescription, Fields.LONG, serviceLocator))) {
return false;
}
if (!isSecure(parameter, serviceLocator)) {
if (!Objects.equal(value, parameter.getValue())) {
return false;
}
} else {
if (!Objects.equal(value, getSecureValue(parameter, serviceLocator))) {
return false;
}
}
} else {
// allow to omit type and value for inherited parameters
if (type != null && !Objects.equal(type, controlDescription == null ? null : new ParameterType(controlDescription, Fields.LONG, serviceLocator))) {
return false;
}
if (value != null) {
if (!isSecure(parameter, serviceLocator)) {
if (!Objects.equal(value, parameter.getValue())) {
return false;
}
} else {
if (!Objects.equal(value, getSecureValue(parameter, serviceLocator))) {
return false;
}
}
}
}
return true;
}