# HG changeset patch # User mullan # Date 1549547230 18000 # Node ID e0f5ad90737c5c36e5f601f70869f3268d2e47b2 # Parent 04cccf60fe441f2b9109f68cb3dc6909a21657c5 8216381: More limited privilege usage Reviewed-by: ahgross, coffeys, rhalade diff -r 04cccf60fe44 -r e0f5ad90737c src/java.base/share/classes/java/security/AccessController.java --- a/src/java.base/share/classes/java/security/AccessController.java Wed Jan 30 14:14:57 2019 +0000 +++ b/src/java.base/share/classes/java/security/AccessController.java Thu Feb 07 08:47:10 2019 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -445,7 +445,8 @@ throw new NullPointerException("null permissions parameter"); } Class caller = Reflection.getCallerClass(); - return AccessController.doPrivileged(action, createWrapper(null, + DomainCombiner dc = (context == null) ? null : context.getCombiner(); + return AccessController.doPrivileged(action, createWrapper(dc, caller, parent, context, perms)); } @@ -860,7 +861,8 @@ throw new NullPointerException("null permissions parameter"); } Class caller = Reflection.getCallerClass(); - return AccessController.doPrivileged(action, createWrapper(null, caller, parent, context, perms)); + DomainCombiner dc = (context == null) ? null : context.getCombiner(); + return AccessController.doPrivileged(action, createWrapper(dc, caller, parent, context, perms)); }