Skip to content

Commit

Permalink
Merge pull request #16417 from keithc-ca/warn20
Browse files Browse the repository at this point in the history
Fix javadoc warnings in jdknext
  • Loading branch information
pshipton committed Dec 5, 2022
2 parents 9c79e90 + 6972c55 commit f7bb492
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 293 deletions.
4 changes: 2 additions & 2 deletions jcl/src/java.base/share/classes/java/lang/Class.java
Original file line number Diff line number Diff line change
Expand Up @@ -5717,8 +5717,8 @@ private static ReflectionFactory getReflectionFactory() {
* present. For a primitive type or void, the PUBLIC and FINAL access flags should always
* be present, and the PROTECTED and PRIVATE access flags should always be absent.
*
* {@return an unmodifiable set of the {@linkplain AccessFlag access flags} for this
* class, possibly empty}
* @return an unmodifiable set of the {@linkplain AccessFlag access flags} for this
* class, possibly empty
*
* @since 20
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
*******************************************************************************/
package java.security;

import java.security.AccessControlContext.AccessCache;
import sun.security.util.SecurityConstants;

/*[IF Sidecar19-SE]
/*[IF JAVA_SPEC_VERSION >= 9]
import jdk.internal.reflect.CallerSensitive;
/*[ELSE]*/
/*[ELSE] JAVA_SPEC_VERSION >= 9 */
import sun.reflect.CallerSensitive;
/*[ENDIF]*/
/*[ENDIF] JAVA_SPEC_VERSION >= 9 */

/**
* Checks access to system resources. Supports marking of code
Expand All @@ -41,6 +40,7 @@
*/
/*[IF JAVA_SPEC_VERSION >= 17]*/
@Deprecated(since="17", forRemoval=true)
@SuppressWarnings("removal")
/*[ENDIF] JAVA_SPEC_VERSION >= 17 */
public final class AccessController {
static {
Expand Down Expand Up @@ -204,7 +204,7 @@ private static void throwACE(boolean debug, Permission perm, ProtectionDomain pD
*
* @return true if access is granted by a limited permission, otherwise return false
*/
private static boolean checkPermissionHelper(Permission perm, AccessControlContext acc, DomainCombiner activeDC, Object[] objects, int frame, AccessCache checked, Object[] objPDomains, int debug, int startPos) {
private static boolean checkPermissionHelper(Permission perm, AccessControlContext acc, DomainCombiner activeDC, Object[] objects, int frame, AccessControlContext.AccessCache checked, Object[] objPDomains, int debug, int startPos) {
boolean limitedPermImplied = false;
boolean debugEnabled = (debug & AccessControlContext.DEBUG_ENABLED) != 0;
ProtectionDomain[] pDomains = generatePDarray(activeDC, acc, objPDomains, debugEnabled, startPos);
Expand Down Expand Up @@ -240,7 +240,7 @@ private static boolean checkPermissionHelper(Permission perm, AccessControlConte

if (2 == startPos) { // Pre-JEP140 format
if (null != acc && (null != acc.doPrivilegedAcc || null != acc.nextStackAcc || acc.isLimitedContext)) {
checked = new AccessCache(); /* checked was null initially when Pre-JEP140 format */
checked = new AccessControlContext.AccessCache(); /* checked was null initially when Pre-JEP140 format */
return AccessControlContext.checkPermissionWithCache(perm, activeDC, pDomains, debug, acc, false, null, null, checked);
} else {
if (pDomains != null) {
Expand Down Expand Up @@ -392,7 +392,7 @@ public static void checkPermission(Permission perm) throws AccessControlExceptio
*/
activeDC = topACC.domainCombiner;
}

if (isPreJEP140Format) {
if ((debug != AccessControlContext.DEBUG_DISABLED) && !debugHelperPreJEP140(objects, perm)) {
debug = AccessControlContext.DEBUG_ACCESS_DENIED; // Disable DEBUG_ENABLED
Expand All @@ -406,7 +406,7 @@ public static void checkPermission(Permission perm) throws AccessControlExceptio
debug = AccessControlContext.DEBUG_ACCESS_DENIED; // Disable DEBUG_ENABLED
}

AccessCache checked = new AccessCache();
AccessControlContext.AccessCache checked = new AccessControlContext.AccessCache();
for (int j = 0; j < frameNbr; ++j) {
AccessControlContext acc = (AccessControlContext) objects[j * OBJS_ARRAY_SIZE];
Object[] objPDomains = (Object[]) objects[j * OBJS_ARRAY_SIZE + OBJS_INDEX_PDS];
Expand Down Expand Up @@ -572,7 +572,7 @@ private static ProtectionDomain[] generatePDarray(DomainCombiner activeDC, Acces
actDC = acc.domainCombiner;
}
}

if (actDC != null) {
if (debug) {
DebugRecursionDetection.getTlDebug().set(""); //$NON-NLS-1$
Expand Down

0 comments on commit f7bb492

Please sign in to comment.