Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed Oct 25, 2023
1 parent d6023f9 commit 2b14f99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agrona/src/main/java/org/agrona/concurrent/MemoryAccess.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public final class MemoryAccess
MethodHandle fullFence = null;
final MethodHandles.Lookup lookup = MethodHandles.lookup();
final MethodType voidMethod = MethodType.methodType(void.class);

try
{
final Class<?> versionClass = Class.forName("java.lang.Runtime$Version"); // since JDK 9
Expand Down Expand Up @@ -67,11 +68,12 @@ public final class MemoryAccess
releaseFence = lookup.findVirtual(unsafeClass, "storeFence", voidMethod).bindTo(UnsafeAccess.UNSAFE);
fullFence = lookup.findVirtual(unsafeClass, "fullFence", voidMethod).bindTo(UnsafeAccess.UNSAFE);
}
catch (final NoSuchMethodException | IllegalAccessException e)
catch (final NoSuchMethodException | IllegalAccessException ex)
{
LangUtil.rethrowUnchecked(e);
LangUtil.rethrowUnchecked(ex);
}
}

ACQUIRE_FENCE = acquireFence;
RELEASE_FENCE = releaseFence;
FULL_FENCE = fullFence;
Expand Down

0 comments on commit 2b14f99

Please sign in to comment.