Skip to content

Fix sonar issues to pass quality gate #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public boolean pathUnchangedParametersChanged(
boolean samePathDifferentParameter = !newParameterRealized.equals(parameter);
newParameterRealized.setName(
newParameterName); // Important:: MUST Reset the name as this is not a copy
return samePathDifferentParameter;
if (samePathDifferentParameter) {
return true;
}
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.openapitools.openapidiff.core.model.schema;

import static org.apache.commons.lang3.BooleanUtils.isTrue;
import static org.openapitools.openapidiff.core.model.BackwardIncompatibleProp.REQUEST_NUMERIC_RANGE_DECREASED;
import static org.openapitools.openapidiff.core.model.BackwardIncompatibleProp.RESPONSE_NUMERIC_RANGE_INCREASED;

Expand Down Expand Up @@ -34,10 +35,10 @@ public DiffResult isChanged() {
return DiffResult.COMPATIBLE;
}

boolean exclusiveMaxOld = oldMaximumExclusiveValue != null && oldMaximumExclusiveValue;
boolean exclusiveMinOld = oldMinimumExclusiveValue != null && oldMinimumExclusiveValue;
boolean exclusiveMaxNew = newMaximumExclusiveValue != null && newMaximumExclusiveValue;
boolean exclusiveMinNew = newMinimumExclusiveValue != null && newMinimumExclusiveValue;
boolean exclusiveMaxOld = isTrue(oldMaximumExclusiveValue);
boolean exclusiveMinOld = isTrue(oldMinimumExclusiveValue);
boolean exclusiveMaxNew = isTrue(newMaximumExclusiveValue);
boolean exclusiveMinNew = isTrue(newMinimumExclusiveValue);
int diffMax = compare(oldMaximumValue, newMaximumValue, false);
int diffMin = compare(oldMinimumValue, newMinimumValue, true);

Expand Down