Closed ltanguy closed 8 months ago
This is due to a limitation in Java where a nested class can't have the same name as any of its outer classes. The following is illegal.
public class A {
public class B {
public class A { // compile error: duplicate class
}
}
}
There is a fields
interface nested inside another fields
interface in the type projected for the JSON file. Apologies for not accounting for this. It will be fixed in next week's build.
Thanks for reporting this!
I looked at the implementation and found that the solution might not fully fix the issue. See my comment here: https://github.com/manifold-systems/manifold/commit/32ba7fdd186195752926b16a1dbade909ed93f05#r128939227
Fix available with release 2024.1.5
Describe the bug When using Manifold-json on a JSON Schema, Java throws an error at compile time about an interface being already defined.
To Reproduce Import the attached file (renamed with a .txt extension to make Github happy) in a project JiraIssuesResponse.json.txt
The Java compiler throws the following error:
Already tried to clean the project, reload the maven project and rebuild the project without success.
Expected behavior The code compiles.
Screenshots If applicable, add screenshots to help explain your problem (drag/drop them here).
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Stack trace Please include a stack trace if applicable