Skip to content

Fix #4426: preserve JDK_HOME priority when sorting JDKs#4427

Open
shblue21 wants to merge 1 commit into
redhat-developer:mainfrom
shblue21:fix-jdk-home-priority
Open

Fix #4426: preserve JDK_HOME priority when sorting JDKs#4427
shblue21 wants to merge 1 commit into
redhat-developer:mainfrom
shblue21:fix-jdk-home-priority

Conversation

@shblue21

Copy link
Copy Markdown
Contributor

JDK_HOME is assigned the highest source priority in sortJdksBySource(), but the rank check treated rank 0 as if no rank had been assigned. That allowed later source ranking to overwrite the JDK_HOME entry and sort it after lower-priority detected JDKs.

This changes the check to look for an assigned numeric rank and adds a regression test for the ordering.

Fixes #4426

@shblue21 shblue21 force-pushed the fix-jdk-home-priority branch from af0ac84 to b915526 Compare June 16, 2026 12:05
@shblue21 shblue21 force-pushed the fix-jdk-home-priority branch from b915526 to 4bf7d1e Compare June 16, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant