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

[Question]: java25 support or build-error

Aperta
#12,688 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
28/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
java, scala

Direzione di ricerca

Riproduci il fallimento con mvn clean package su Java 25 e confrontalo con il risultato segnalato su Java 21. Inizia con ScalaCodegenTest.shouldCallFormatIdentifierOnGetModelName e il makepkg.log allegato; determina se il fallimento di Mockito è un bug di compatibilità con Java 25 oppure se il progetto documenta una versione di Java supportata e richiede un vincolo di packaging.

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

Descrizione

Is this a bug or is java25 unsupported?

Hi,

I currently package swagger-codegen (3.0.77-1) like so, boiling down to:

mvn clean package

which currently is

$ mvn -version
Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1)
Maven home: /usr/share/java/maven
Java version: 25.0.2, vendor: Arch Linux, runtime: /usr/lib/jvm/java-25-openjdk
Default locale: de_AT, platform encoding: UTF-8
OS name: "linux", version: "6.18.9-arch1-2", arch: "amd64", family: "unix"

however with swagger-codegen 3.0.78 I get the following error (x 2) during mvn package tests:

[ERROR] Failures: 
[ERROR]   ScalaCodegenTest.shouldCallFormatIdentifierOnGetModelName:27 Mockito 
Mockito cannot mock this class: class io.swagger.codegen.languages.ScalaClientCodegen.

If you're not sure why you're getting this error, please open an issue on GitHub.

[...]

You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes 
  [class io.swagger.codegen.languages.AbstractScalaCodegen,
   class java.lang.Object,
   class io.swagger.codegen.languages.ScalaClientCodegen,
   class io.swagger.codegen.DefaultCodegen, 
   interface io.swagger.codegen.CodegenConfig]

(full log attached)

And to be honest, this is above my java/maven foo. It looks like Mockito cannot parse/dissasable some ScalaClientCodegen class due to too-new java-version?

So, is this a bug or should I package it with a java<=21 requirement? (could not find any info regarding java version)

Swagger Codegen Version

3.0.78

What Have You Tried?

building with java21 works.

Checklist

  • [ x] I have searched the existing issues and documentation.
  • [ x] I have provided enough context for maintainers to understand the question.
  • [ x] This is not a feature request or bug report.

makepkg.log

Lingua principale
Mustache
Stelle
17.8k
Fork
6k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 swagger-api/swagger-codegen

Tutte le issue di swagger-api/swagger-codegen

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.