1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

fix multiple annotations npe

Hints annotation needs add @Retention(RetentionPolicy.RUNTIME), otherwise it will throw npe.
This commit is contained in:
Mike Liu 2021-04-18 18:53:20 +08:00 committed by GitHub
parent 6728674aaa
commit 0a38f722c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -872,6 +872,7 @@ System.out.println(string); // Nov 03, 2014 - 07:13
首先定义一个包装类Hints注解用来放置一组具体的Hint注解 首先定义一个包装类Hints注解用来放置一组具体的Hint注解
```java ```java
@Retention(RetentionPolicy.RUNTIME)
@interface Hints { @interface Hints {
Hint[] value(); Hint[] value();
} }