ArrayOutOfBoundsException on Bean creation while using Java 8 constructs

后端 未结 2 887
深忆病人
深忆病人 2021-01-31 08:54

I am getting an ArrayIndexOutOfBoundsException on service start up (Bean creation) when i use Java 8 features.

Java 8 has been set up and has been working.

2条回答
  •  佛祖请我去吃肉
    2021-01-31 09:34

    I found a bug recently when using Spring 3.0.5, which appears to be fixed in 4.0.5. Here are the details.

    If you have a class that has a parameterized constructor and also has a method that uses a lambda expression (introduced in Java 8), then a ArrayIndexOutOfException occurs when creating a bean for that class.

提交回复
热议问题