Skip to content

Generic types don't use their raw type for imports#1754

Closed
rodmibielli wants to merge 1 commit intospring-io:mainfrom
rodmibielli:rodmibielli
Closed

Generic types don't use their raw type for imports#1754
rodmibielli wants to merge 1 commit intospring-io:mainfrom
rodmibielli:rodmibielli

Conversation

@rodmibielli
Copy link
Contributor

@rodmibielli rodmibielli commented Feb 18, 2026

This little correction avoids a syntax error in the generated code whenever you have a javacode with generics type.

example:

public one.One<String> method() {
  return null;
}

It generates

import one.One<String>; (wrong!)

With this fix
it then generates

import one.One;

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 18, 2026
Signed-off-by: rodmibielli <rodrigo.mibielli@gmail.com>
@mhalbritter mhalbritter self-assigned this Feb 20, 2026
@mhalbritter mhalbritter changed the title Removes potentially generics substring in imports candidates. Use raw types for imports Feb 20, 2026
@mhalbritter mhalbritter added type: bug and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 20, 2026
@mhalbritter mhalbritter changed the title Use raw types for imports Generic types don't use their raw type for imports Feb 20, 2026
@mhalbritter mhalbritter added this to the 0.24.0 milestone Feb 20, 2026
mhalbritter pushed a commit that referenced this pull request Feb 20, 2026
See gh-1754

Signed-off-by: rodmibielli <rodrigo.mibielli@gmail.com>
mhalbritter added a commit that referenced this pull request Feb 20, 2026
This also ensures that only raw types are imported when using Groovy or
Kotlin.

See gh-1754
@mhalbritter
Copy link
Contributor

Thanks for the PR, @rodmibielli ! I've also added the same treatment for Groovy and Kotlin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants