apache / apache/maven-enforcer

Maybe switch this version checking if into an else statement?

Open
#902 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
161
Forks
180
Avg merge
1d 20m
Merged PRs (30d)
8

Description

### New feature, improvement proposal

Saw this in #901

The second if (`if (!version.contains("8"))` looks strange. I was not able to produce an unexpected behavior, but shouldn't this be just a simple `else` to the first if?

![Image](https://github.com/user-attachments/assets/02a5d2e8-3013-4019-9d22-c4a49122bc4b)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading issue #901 and locating the version-checking code shown in the attached image. Compare the second `if (!version.contains("8"))` with the preceding condition, then verify that changing the branching structure preserves the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.