Skip to content

[Bug]: FormatRegistry thread safety documented but not enforced #207

@Splatcrafter

Description

@Splatcrafter

AI REVIEWED

Module: cli
File: cli/format/FormatRegistry.java (~line 62-65)
Severity: Medium

Summary

Documentation warns that register() is not synchronized, but no enforcement prevents concurrent registration. Uses LinkedHashMap which is not thread-safe.

Suggested Fix

Either:

  1. Use ConcurrentHashMap and synchronize register()
  2. Freeze after initialization (like the core registries)
  3. Throw exception if registration attempted after first get() call

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions