Skip to content

IndexOutOfBoundsException with no stacktrace with setter with no params #19

@PlanetTeamSpeakk

Description

@PlanetTeamSpeakk

I made a mixin with a couple getters and two setters, but I forgot to add parameters to those setters which caused an IndexOutOfBoundsException with no stacktrace to be thrown whenever I tried to build, launch, etc.
This was a huge pain as finding the cause of an error with no stacktrace is no easy task.
The message of the exception was Index: 0, Size: 0 so I can only assume that Mercury assumes that setters always have a parameter and doesn't actually check for it first.

The mixin that caused this error was

@Mixin(Entity.class)
public interface MixinEntityAccessor {
    @Accessor("entityId")
    int getEntityId_();

    @Accessor("yaw")
    float getYaw_();

    @Accessor("pitch")
    float getPitch_();

    @Accessor("yaw")
    void setYaw_();

    @Accessor("pitch")
    void setPitch_();
}

As you can see, the last two methods, which are setters, don't have a parameter even though they obviously should.
A more detailed error message, especially one stating where this mistake was made, would be highly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions