Skip to content

Commit

Permalink
Recompute unsafe ArrayIndexShift vallue in shaded jctools
Browse files Browse the repository at this point in the history
Removes warning:

```
Warning: RecomputeFieldValue.ArrayIndexScale automatic substitution
failed. The automatic substitution registration was attempted because a
call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) was detected in
the static initializer of
io.netty.util.internal.shaded.org.jctools.util.UnsafeLongArrayAccess. Detailed
failure reason(s): Could not determine the field where the value
produced by the call to jdk.internal.misc.Unsafe.arrayIndexScale(Class)
for the array index scale computation is stored. The call is not
directly followed by a field store or by a sign extend node followed
directly by a field store.
```
  • Loading branch information
zakkak committed Jun 17, 2024
1 parent dced341 commit 91ddb6d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,14 @@ private static PrivateKey getPrivateKeyFromByteBuffer(ByteBuf encodedKeyBuf, Str
}
}

@TargetClass(className = "io.netty.util.internal.shaded.org.jctools.util.UnsafeLongArrayAccess")
final class Target_io_netty_util_internal_shaded_org_jctools_util_UnsafeRefArrayAccess {

@Alias
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.ArrayIndexShift, declClass = Object[].class)
public static int LONG_ELEMENT_SHIFT;
}

class IsBouncyNotThere implements BooleanSupplier {

@Override
Expand Down

0 comments on commit 91ddb6d

Please sign in to comment.