Skip to content

(moneta) Fix MonetaMoneyModule.getModuleName() returning "JavaxMoneyModule" - #93

Open
pjfanning wants to merge 2 commits into
FasterXML:3.xfrom
pjfanning:fix-moneta-module-name
Open

(moneta) Fix MonetaMoneyModule.getModuleName() returning "JavaxMoneyModule"#93
pjfanning wants to merge 2 commits into
FasterXML:3.xfrom
pjfanning:fix-moneta-module-name

Conversation

@pjfanning

Copy link
Copy Markdown
Member

Problem

Copy-paste slip in MonetaMoneyModule:

@Override
public String getModuleName() {
    return JavaxMoneyModule.class.getSimpleName();   // -> "JavaxMoneyModule"
}

So the module reports itself under the base module's name:

new MonetaMoneyModule().getModuleName()  ->  "JavaxMoneyModule"
new JavaxMoneyModule().getModuleName()   ->  "JavaxMoneyModule"

Registration itself is fine — getRegistrationId() correctly resolves to tools.jackson.datatype.moneta.MonetaMoneyModule, so there is no duplicate-registration collision between the two modules — but the name is wrong everywhere it gets reported.

Fix

Return MonetaMoneyModule.class.getSimpleName().

Tests

New ModuleNameTest: asserts the moneta module's own name, that it differs from the base module's, and that JavaxMoneyModule keeps its (already correct) name.

javax-money 135 tests and moneta 140 tests all green.

pjfanning and others added 2 commits September 9, 2026 10:18
…yModule"

Copy-paste slip: the override returns `JavaxMoneyModule.class.getSimpleName()`,
so `MonetaMoneyModule` reports itself under the base module's name.

Module registration is unaffected -- `getRegistrationId()` correctly resolves to
`tools.jackson.datatype.moneta.MonetaMoneyModule`, so there is no dedup
collision -- but the name is wrong everywhere it is reported.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant