Skip to content

Commit

Permalink
refactor: Operator wrapping on end of line
Browse files Browse the repository at this point in the history
  • Loading branch information
2 people authored and app committed Sep 21, 2024
1 parent c60a484 commit 3e57f11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,15 @@ private void analyzeDependency(
// Therefore ignore the suffix during comparison but record it so that version upgrades can try both with and without the suffix
// The edge case of ".RELEASE" being introduced into a version scheme between patch versions is possible but hopefully rare
boolean isLessThanFixed = StringUtils.isBlank(v.getFixedVersion());
if (!isLessThanFixed
&& vc.compare(
if (!isLessThanFixed &&
vc.compare(
versionParser.transform(stripExtraneousVersionSuffix(v.getFixedVersion())),
versionParser.transform(stripExtraneousVersionSuffix(resolvedDependency.getVersion()))) > 0) {
isLessThanFixed = true;
}

if (isLessThanFixed
&& vc.compare(
if (isLessThanFixed &&
vc.compare(
versionParser.transform(stripExtraneousVersionSuffix(v.getIntroducedVersion())),
versionParser.transform(stripExtraneousVersionSuffix(resolvedDependency.getVersion()))) <= 0) {
if (gavVs == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IO

Advisory advisory = reader.readValue(path.toFile(), Advisory.class);
for (Affected affected : advisory.getAffected()) {
if (affected.getPkg().getEcosystem().equalsIgnoreCase(ecosystem)
&& affected.getRanges() != null
&& !affected.getRanges().isEmpty()) {
if (affected.getPkg().getEcosystem().equalsIgnoreCase(ecosystem) &&
affected.getRanges() != null &&
!affected.getRanges().isEmpty()) {
Range range = affected.getRanges().iterator().next();
String cve = advisory.getAliases().isEmpty() ?
advisory.getId() :
Expand Down

0 comments on commit 3e57f11

Please sign in to comment.