Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Corretto distribution_version loses build/revision components

Aperta
#164 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@HanSolo ci sta già lavorando.

Dal 6/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Start with Corretto#getAllPkgsFromHtml in src/main/java/io/foojay/api/distribution/Corretto.java, especially lines 398–404, and compare its version handling with the linked Corretto build.gradle version configuration. Check how the parsed values populate distribution_version, java_version, and latest_build_available; done means the full distribution revision and OpenJDK patch are represented correctly and only the newest Corretto revision is marked available.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

I'm seeing incorrect distribution_version values for recent Corretto releases.

For example, DiscoAPI returns these artifacts:

amazon-corretto-25.0.4.7.1-windows-x64-jdk.zip
amazon-corretto-25.0.4.8.1-windows-x64-jdk.zip
amazon-corretto-25.0.4.10.1-windows-x64-jdk.zip

but all three have:

"java_version": "25.0.4",
"distribution_version": "25.0.4",
"latest_build_available": true

The distribution_version should preserve the full Corretto version.

There also seems to be an issue with java_version. Corretto's changelog explicitly states that 25.0.4.8.1 updates its baseline to OpenJDK 25.0.4.1+1, but DiscoAPI still reports 25.0.4.

Looking at Corretto#getAllPkgsFromHtml, this seems related to:

https://github.com/foojayio/discoapi/blob/f3ccc80944ab62a45054a444523152b65d650cf2/src/main/java/io/foojay/api/distribution/Corretto.java#L398-L404

versionNumber and vNumber reference the same object, so setPatch(0) also changes the value later used as distribution_version.

More importantly, this code assumes that the Java PATCH component is always zero. That is no longer valid for CSPU releases such as 25.0.4.1.

The Corretto build also treats the fourth component of its distribution version as the build number, while the Java PATCH value comes from the OpenJDK version configuration, so these two concepts cannot be derived from the same field.

Also, all three packages are currently marked as latest_build_available=true, which makes it impossible for clients to determine the newest Corretto revision from the structured metadata alone.

Lingua principale
Java
Stelle
155
Fork
18
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di foojayio/discoapi

Tutte le issue di foojayio/discoapi

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.