mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8294241: Deprecate URL public constructors
Reviewed-by: joehw, prr, alanb, aefimov, michaelm
This commit is contained in:
parent
68209adfa7
commit
4338f527aa
82 changed files with 848 additions and 146 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, 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
|
||||
|
@ -94,7 +94,8 @@ public class Handler extends URLStreamHandler {
|
|||
URL newurl;
|
||||
|
||||
try {
|
||||
newurl = new URL("ftp", host, file +
|
||||
@SuppressWarnings("deprecation")
|
||||
var _unused = newurl = new URL("ftp", host, file +
|
||||
(url.getRef() == null ? "":
|
||||
"#" + url.getRef()));
|
||||
if (p != null) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, 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
|
||||
|
@ -155,7 +155,8 @@ class JarFileFactory implements URLJarFile.URLJarFileCloseController {
|
|||
if (host != null && !host.isEmpty() &&
|
||||
!host.equalsIgnoreCase("localhost")) {
|
||||
|
||||
url = new URL("file", "", "//" + host + url.getPath());
|
||||
@SuppressWarnings("deprecation")
|
||||
var _unused = url = new URL("file", "", "//" + host + url.getPath());
|
||||
}
|
||||
}
|
||||
return url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue