Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: HashCode Exception When Nested Records Contain Duplicate Field Names #43673

Open
Ajai-Suvendran opened this issue Dec 3, 2024 · 0 comments
Labels
Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug

Comments

@Ajai-Suvendran
Copy link

Description

While performing data mapping in Ballerina, an issue arises when a record contains two fields, one of which is another nested record. If the nested record has a field with the same name as a field in the outer record, it causes a hashCode exception, as seen in the following stack trace:
at java.base/java.util.Objects.hashCode(Objects.java:103)
at org.wso2.ballerinalang.compiler.bir.model.BirScope.hashCode(BirScope.java:29)
This issue may occur due to duplicate field names in the hierarchy, leading to a conflict during compilation or runtime.

Steps to Reproduce

test.zip

Affected Version(s)

2202.10.1

OS, DB, other environment details and versions

No response

Related area

-> Runtime

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added the Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug
Projects
None yet
Development

No branches or pull requests

2 participants