Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix UnsafeAccess perm checking
  • Loading branch information
Karlatemp committed Jul 9, 2022
1 parent 971c479 commit 4ef8300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -157,8 +157,8 @@ static class Secret {
@Contract(pure = false)
public static <T> T throw0(Throwable throwable) {
if (throwable == null) throw new NullPointerException();
getUnsafe().throwException(throwable);
throw new RuntimeException();
Unsafe.getUnsafe0().throwException(throwable);
throw new RuntimeException(throwable);
}

/**
Expand Down
Expand Up @@ -17,7 +17,8 @@ public final class UnsafeAccess extends ProtectedObject {
static final UnsafeAccess INSTANCE = new UnsafeAccess();

public static UnsafeAccess getInstance() {
SecurityCheck.getInstance();
SecurityCheck.AccessLimiter accessLimiter = SecurityCheck.getInstance().getLimiter();
if (accessLimiter != null) accessLimiter.preGetUnsafeAccess();
return INSTANCE;
}

Expand Down

0 comments on commit 4ef8300

Please sign in to comment.