Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Question]: java25 support or build-error

オープン
#12,688 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java, scala

調査の方向性

Java 25 で mvn clean package を実行して失敗を再現し、報告されている Java 21 の結果と比較してください。まず ScalaCodegenTest.shouldCallFormatIdentifierOnGetModelName と添付の makepkg.log を確認し、Mockito の失敗が Java 25 の互換性バグなのか、それともプロジェクトがサポート対象の Java バージョンを文書化しており、パッケージングの制約が必要なのかを判断してください。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Mustache
スター
17.8k
フォーク
6k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

swagger-api/swagger-codegen のほかの issue

swagger-api/swagger-codegen の issue をすべて見る

似ている issue

Build System の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。