Skip to content

Use getDeclaredClass on Enum #21

@tkoeppe

Description

@tkoeppe

I don't know Java well, so I'd just like to leave this as a suggestion, without judgement:

Our static analysis suggests a change at https://github.com/qmx/jitescript/blob/master/src/main/java/me/qmx/jitescript/VisibleAnnotation.java#L34, to change value.getClass() to value.getDeclaredClass(). The former returns some derived class for enums that declare methods, whereas the latter returns the actual enum type.

I'm not sure if that's correct, but it was flagged as an error-prone pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions