Skip to content

ModuleLoader not thread safe #720

Closed
Closed

Description

@PascalSchumacher

ModuleLoader#LOADED_MODULES uses a HashMap. In a multi-threaded environment this can lead to problems like every thread having their own copy.

By the way: Thank you very much for all you work on simple java mail. It is a great library.

Activity

  1. bbottema commented on Sep 5, 2026

    @bbottema
    Owner

    Thank you for reporting this. I'll look into it asap!

  2. self-assigned this
    on Sep 5, 2026
  3. added this to the 9.3.3 milestone on Sep 5, 2026
  4. bbottema commented on Sep 5, 2026

    @bbottema
    Owner

    Fixed in 9.3.3: ModuleLoader now initializes optional modules atomically, so concurrent first use reuses a single module instance. Thanks again for the clear report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions