Skip to content

@ExtensionMethod fails on Eclipse Oxygen if there is more than 1 parameter  #1441

Closed
@Kilrath

Description

@Kilrath

Following simple example fails with an ArrayIndexOutOfBoundsException due to compiling with Eclipse Oxygen (jdk 1.8+):

public class A {
public static Object test(Object object, Object returnThis) {
return returnThis;
}
}

@ExtensionMethod(A.class)
class B {
public Object testExtensionMethod(Object object) {
return object.test(new Object());
}
}

Exception
Internal compiler error:
java.lang.ArrayIndexOutOfBoundsException

In Eclipse Neon it works!

Activity

datomesan

datomesan commented on Oct 28, 2017

@datomesan

I have the same problem and Eclipse show that error
Internal compiler error: java.lang.ArrayIndexOutOfBoundsException: 1 at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:182)

janaroj

janaroj commented on Feb 1, 2018

@janaroj

Having the same issue with Eclipse Oxygen:
java.lang.ArrayIndexOutOfBoundsException: 1
at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:182)

mad-pojo

mad-pojo commented on Apr 17, 2018

@mad-pojo

I make a correction: @ExtensionMethod fails if there are exactly 2 parameters.
Workaround: in the preferences "Java / Compiler / Errors/Warnings" switch the options "Unlikely argument type for collection methods using 'Object'" and "Unlikely argument type for method equals()" to "Ignore".
This feature will be ignored.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @mad-pojo@janaroj@Kilrath@datomesan

      Issue actions

        @ExtensionMethod fails on Eclipse Oxygen if there is more than 1 parameter · Issue #1441 · projectlombok/lombok