Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
Signed-off-by: mehab <[email protected]>
  • Loading branch information
mehab committed Oct 27, 2023
1 parent e37dde5 commit 7b54ff2
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.github.nscuro.versatile.Vers;
import io.github.nscuro.versatile.VersException;
import org.apache.commons.lang3.tuple.Pair;
import org.dependencytrack.model.PolicyCondition;
import org.dependencytrack.model.RepositoryType;
import org.dependencytrack.persistence.QueryManager;
import org.dependencytrack.proto.policy.v1.Component;
Expand Down Expand Up @@ -200,7 +199,6 @@ private static Val matchesVersionDistanceFunc(Val... vals) {
}

private static boolean matchesVersionDIstance(Component component, String value, String comparator) {

String comparatorComputed = switch (comparator) {
case "NUMERIC_GREATER_THAN", ">" -> "NUMERIC_GREATER_THAN";
case "NUMERIC_GREATER_THAN_OR_EQUAL", ">=" -> "NUMERIC_GREATER_THAN_OR_EQUAL";
Expand All @@ -210,8 +208,8 @@ private static boolean matchesVersionDIstance(Component component, String value,
case "NUMERIC_LESS_THAN", "<" -> "NUMERIC_LESS_THAN";
default -> "";
};
if(comparatorComputed.equals("")){
LOGGER.warn("Was passed a not supported operator for version distance policy "+comparator);
if (comparatorComputed.equals("")) {
LOGGER.warn("Was passed a not supported operator for version distance policy " + comparator);
return false;
}
final VersionDistance versionDistance;
Expand Down

0 comments on commit 7b54ff2

Please sign in to comment.