Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug] Brackets omitted for arrays of generic types #4421

Closed
seintur opened this issue Jan 7, 2022 · 1 comment · Fixed by #4436
Closed

[Bug] Brackets omitted for arrays of generic types #4421

seintur opened this issue Jan 7, 2022 · 1 comment · Fixed by #4436

Comments

@seintur
Copy link
Contributor

seintur commented Jan 7, 2022

Dear all,

The Inria CI for project Juliac bumped into an issue 2 days ago. By figuring out what is going out, the issue can be trimmed down to the following simple case.

To Reproduce

Input:

class C { Class<?>[] foo; }

Processing with Spoon:

System.out.println( Launcher.parseClass("class C { Class<?>[] foo; }") );

Output:

class C {
    Class<?> foo;
}

Note that the issue does not arise with array of raw types, e.g. Class[] is correctly pretty-printed.

Operating system, JDK and Spoon version used

  • OS: macOS
  • JDK: 13
  • Spoon version: latest from github
@algomaster99
Copy link
Contributor

Hi! Thanks for the bug report. I am able to reproduce the issue. I worked on it a few days ago. See #4341. I may have missed the case for parametrizedTypeReferences. I can work on a fix for this one.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants