8294241: Deprecate URL public constructors

Reviewed-by: joehw, prr, alanb, aefimov, michaelm
This commit is contained in:
Daniel Fuchs 2022-11-03 17:18:14 +00:00
parent 68209adfa7
commit 4338f527aa
82 changed files with 848 additions and 146 deletions

View file

@ -110,14 +110,16 @@ public class PolicyUtil {
if (storePassURL != null) {
URL passURL;
try {
passURL = new URL(storePassURL);
@SuppressWarnings("deprecation")
var _unused = passURL = new URL(storePassURL);
// absolute URL
} catch (MalformedURLException e) {
// relative URL
if (policyUrl == null) {
throw e;
}
passURL = new URL(policyUrl, storePassURL);
@SuppressWarnings("deprecation")
var _unused = passURL = new URL(policyUrl, storePassURL);
}
if (debug != null) {
@ -138,14 +140,16 @@ public class PolicyUtil {
*/
URL keyStoreUrl;
try {
keyStoreUrl = new URL(keyStoreName);
@SuppressWarnings("deprecation")
var _unused = keyStoreUrl = new URL(keyStoreName);
// absolute URL
} catch (MalformedURLException e) {
// relative URL
if (policyUrl == null) {
throw e;
}
keyStoreUrl = new URL(policyUrl, keyStoreName);
@SuppressWarnings("deprecation")
var _unused = keyStoreUrl = new URL(policyUrl, keyStoreName);
}
if (debug != null) {