Skip to content

Commit

Permalink
to be JDK6-buildable, replace SafeVarargs with SuppressWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rzwitserloot committed Jan 19, 2023
1 parent e02d0c6 commit 8602953
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/lombok/core/LombokImmutableList.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public static <T> LombokImmutableList<T> of(T a, T b, T c, T d, T e) {
return new LombokImmutableList<T>(new Object[] {a, b, c, d, e});
}

@SafeVarargs public static <T> LombokImmutableList<T> of(T a, T b, T c, T d, T e, T f, T... g) {
@SuppressWarnings({"all", "unchecked"})
public static <T> LombokImmutableList<T> of(T a, T b, T c, T d, T e, T f, T... g) {
Object[] rest = g == null ? new Object[] {null} : g;
Object[] val = new Object[rest.length + 6];
System.arraycopy(rest, 0, val, 6, rest.length);
Expand Down

0 comments on commit 8602953

Please sign in to comment.