Skip to content

If in the JAVA code I use a List of Enum but in the model I only have the reference to the Enum, the plugin didn't complain about it. #7

@juan-conca

Description

@juan-conca

Describe the bug
When I define a CommandEvent that has a reference to an attribute in the java code but is not the same type, the plugging didn't complain.

To Reproduce
Create your own CommandEvent in the model:

enum UserRole {
           USER_ROLE_1,
           USER_ROLE_2,
           USER_ROLE_3,
           USER_ROLE_4
}

CommandEvent UserChangeRolesCommand {
           - UserId userId;
           - UserRole userRoles;
           - UserId submittedBy;
}

Then in your JAVA code, you make the error to define a list of enums, not just an enum:

@Command
@DomainRing
public final class UserChangeRolesCommand {

    private final UserId userId;
    private final List<UserRole> userRoles;
    private final UserId submittedBy;
    ...

And when compile, the plugging is not complaining about the difference of types

Expected behaviour
I expect that If I define a list in the JAVA code and is not the same type in the model, the plugging complains

IDE and Plugin (please complete the following information):

IntelliJ IDEA 2022.3 (Ultimate Edition)
Build #IU-223.7571.182, built on November 29, 2022
Runtime version: 17.0.5+1-b653.14 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.0.1
GC: G1 Young Generation, G1 Old Generation
Non-Bundled Plugins:
com.intellij.kubernetes (223.7571.188)
com.dubreuia (2.3.0)
de.docksnet.puml.syntaxchecker (0.2.0)
PlantUML integration (5.20)
org.asciidoctor.intellij.asciidoc (0.38.3)
org.mapstruct.intellij (1.4.0)
com.haulmont.jpab (2022.5.1-223)
org.sonarlint.idea (7.2.1.58118)

Kotlin: 223-1.7.20-release-201-IJ7571.182

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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