[Bug]: Switch docker-java transport to httpclient5 to avoid Java 24 warning

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, java

調査の方向性

この issue では Core モジュールが特定されていますが、ファイルやテストは示されていません。まず Core モジュールの docker-java transport 依存関係を追跡し、提案されている httpclient5 transport と比較してください。完了条件は、Java 24 が JNA の restricted-access warning を出力しなくなり、既存の Core の動作が引き続き機能することです。

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

説明

type/bug
Module

Core

Testcontainers version

1.20.6

Using the latest Testcontainers version?

Yes

Host OS

Win11 x64

Host Arch

x64

Docker version
Client:                                                                                                                                                                                   
 Version:           28.0.4                                                                                                                                                                
 API version:       1.48                                                                                                                                                                  
 Go version:        go1.23.7                                                                                                                                                              
 Git commit:        b8034c0                                                                                                                                                               
 Built:             Tue Mar 25 15:07:48 2025                                                                                                                                              
 OS/Arch:           windows/amd64                                                                                                                                                         
 Context:           desktop-linux                                                                                                                                                         
                                                                                                                                                                                          
Server: Docker Desktop 4.40.0 (187762)                                                                                                                                                    
 Engine:                                                                                                                                                                                  
  Version:          28.0.4                                                                                                                                                                
  API version:      1.48 (minimum version 1.24)                                                                                                                                           
  Go version:       go1.23.7                                                                                                                                                              
  Git commit:       6430e49                                                                                                                                                               
  Built:            Tue Mar 25 15:07:22 2025                                                                                                                                              
  OS/Arch:          linux/amd64                                                                                                                                                           
  Experimental:     false                                                                                                                                                                 
 containerd:                                                                                                                                                                              
  Version:          1.7.26                                                                                                                                                                
  GitCommit:        753481ec61c7c8955a23d6ff7bc8e4daed455734                                                                                                                              
 runc:                                                                                                                                                                                    
  Version:          1.2.5                                                                                                                                                                 
  GitCommit:        v1.2.5-0-g59923ef                                                                                                                                                     
 docker-init:                                                                                                                                                                             
  Version:          0.19.0                                                                                                                                                                
  GitCommit:        de40ad0
What happened?

When using Java 24, the JNA transitive dependency of the zerodep transport of docker-java produces the following message:

Short of requiring every user of testcontainers-java to add a JVM arg, there is no other option but to switch the docker-java transport to get rid of this warning. Httpclient5 would be a good candidate.

Relevant log output
WARNING: A restricted method in java.lang.System has been called                                                                                                                          
WARNING: java.lang.System::load has been called by com.sun.jna.Native in an unnamed module (file:/X:/gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.13.0/1200e7ebeedbe0d10062093f32925a912020e747/jna-5.13.0.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module                                                                                             
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
Additional Information
主要言語
Java
スター
8.8k
フォーク
2k
平均マージ
2日 1時間
マージ済み PR(30日)
11

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

testcontainers/testcontainers-java のほかの issue

testcontainers/testcontainers-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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