Skip to content

Commit

Permalink
Merge pull request #735 from OpenAPITools/fix-sonar-issues
Browse files Browse the repository at this point in the history
Fix sonar issues to pass quality gate
  • Loading branch information
DrSatyr authored Jan 30, 2025
2 parents ebab734 + d2e50d6 commit 49eaec9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
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

0 comments on commit 49eaec9

Please sign in to comment.