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. --- ...6\226\260\347\211\271\346\200\247\346\200\273\347\273\223.md" | 1 + 1 file changed, 1 insertion(+) diff --git "a/docs/java/new-features/Java8\346\226\260\347\211\271\346\200\247\346\200\273\347\273\223.md" "b/docs/java/new-features/Java8\346\226\260\347\211\271\346\200\247\346\200\273\347\273\223.md" index e5a87f0b341..e2a1a4aaa0f 100644 --- "a/docs/java/new-features/Java8\346\226\260\347\211\271\346\200\247\346\200\273\347\273\223.md" +++ "b/docs/java/new-features/Java8\346\226\260\347\211\271\346\200\247\346\200\273\347\273\223.md" @@ -872,6 +872,7 @@ System.out.println(string); // Nov 03, 2014 - 07:13 首先定义一个包装类Hints注解用来放置一组具体的Hint注解: ```java +@Retention(RetentionPolicy.RUNTIME) @interface Hints { Hint[] value(); }