Skip to content

Commit

Permalink
Adding AccessController
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Feb 22, 2021
1 parent 7bed1a7 commit 51638f8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.glassfish.jersey.server.internal.monitoring.core;

import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -57,8 +58,8 @@ public Integer run() {
};
int collisionBuffePower = DEFAULT_COLLISION_BUFFER_POWER;
try {
collisionBuffePower = action.run();
} catch (SecurityException e) {
AccessController.doPrivileged(action);
} catch (Exception e) {
Logger.getLogger(ReservoirConstants.class.getName()).log(Level.WARNING, e.getLocalizedMessage(), e);
}
COLLISION_BUFFER_POWER = collisionBuffePower;
Expand Down

0 comments on commit 51638f8

Please sign in to comment.