java @SafeVarargs why do private methods need to be final

后端 未结 2 1962
离开以前
离开以前 2021-01-03 19:36

I have a private method in an inner class which is private I would like to use the SafeVarargs annotation. However, I am required to either have a static or final method. Wh

2条回答
  •  时光说笑
    2021-01-03 20:33

    This feature is part of Project Coin 2 and will be avalaible in Java 9 coming July 2017.

    It's call Accepting @SafeVarargs on private methods.

    Link.

提交回复
热议问题