Skip to content

Fix Java map code generation#267

Open
Aayush10016 wants to merge 1 commit into
accordproject:mainfrom
Aayush10016:fix/issue-265-java-map-codegen
Open

Fix Java map code generation#267
Aayush10016 wants to merge 1 commit into
accordproject:mainfrom
Aayush10016:fix/issue-265-java-map-codegen

Conversation

@Aayush10016

Copy link
Copy Markdown

Summary

Fixes generated Java for Concerto map declarations that use scalar aliases or imported map member types.

The Java visitor now:

  • emits Map<K, V> consistently for map fields, getters, and setters
  • unwraps scalar aliases used as map keys or values, for example SSN -> String
  • avoids importing scalar and map declarations that are not emitted as Java classes
  • imports non-scalar map member types, such as enums, when they are required by generated map fields
  • enables the hr_integration Java compile verification case that was previously skipped for this bug

Validation

  • npm.cmd ci
  • npm.cmd run mocha -- test/codegen/fromcto/java/javavisitor.js
  • npm.cmd run test:verify -- --grep "generated Java"
  • npm.cmd run mocha -- test/codegen/codegen.js
  • npm.cmd run test:verify
  • npm.cmd run lint

npm.cmd test -- --grep JavaVisitor was also attempted, but the repository's global coverage gate still runs for filtered tests, so the focused mocha command above is the valid JavaVisitor test signal.

Fixes #265.

Signed-off-by: Aayush Tiwari <aayushtiwari1001@gmail.com>
@Aayush10016
Aayush10016 marked this pull request as ready for review July 17, 2026 15:05
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.

bug: Java verification - generated output fails javac

1 participant