Skip to content

Create local variable quick fix is broken for types with multiple generic arguments. #3874

Description

@alexet

I had something like

x = new HashMap<Integer, Integer>();

This gives an error x cannot be resolved to a variable. This has a fix Create local vartiable 'x'.

It used to become (not sure when it changed, but fairly recently)

HashMap<Integer, Integer> x = new HashMap<Integer, Integer>();

But now it becomes

HashMap<Integer x = new HashMap<Integer, Integer>();

With a drop down containing HashMap<Integer and Integer>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions