From 0a38f722c183d09d91002a4e91165c5865b5638d Mon Sep 17 00:00:00 2001 From: Mike Liu <657829312@qq.com> Date: Sun, 18 Apr 2021 18:53:20 +0800 Subject: [PATCH] fix multiple annotations npe Hints annotation needs add @Retention(RetentionPolicy.RUNTIME), otherwise it will throw npe. --- docs/java/new-features/Java8新特性总结.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/java/new-features/Java8新特性总结.md b/docs/java/new-features/Java8新特性总结.md index e5a87f0b..e2a1a4aa 100644 --- a/docs/java/new-features/Java8新特性总结.md +++ b/docs/java/new-features/Java8新特性总结.md @@ -872,6 +872,7 @@ System.out.println(string); // Nov 03, 2014 - 07:13 首先定义一个包装类Hints注解用来放置一组具体的Hint注解: ```java +@Retention(RetentionPolicy.RUNTIME) @interface Hints { Hint[] value(); }