8209416: Refactoring GetPropertyAction calls in security libs

Reviewed-by: xuelei, rriggs
This commit is contained in:
Weijun Wang 2018-08-14 22:39:34 +08:00
parent 815cdefb43
commit 33a96c6df9
29 changed files with 146 additions and 196 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2018, 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
@ -25,6 +25,8 @@
package com.sun.security.ntlm;
import sun.security.action.GetBooleanAction;
import static com.sun.security.ntlm.Version.*;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@ -55,10 +57,8 @@ class NTLM {
private final MessageDigest md4;
private final Mac hmac;
private final MessageDigest md5;
private static final boolean DEBUG =
java.security.AccessController.doPrivileged(
new sun.security.action.GetBooleanAction("ntlm.debug"))
.booleanValue();
private static final boolean DEBUG
= GetBooleanAction.privilegedGetProperty("ntlm.debug");
final Version v;