mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
|
@ -172,14 +172,17 @@ public abstract class JarURLConnection extends URLConnection {
|
|||
throw new MalformedURLException("no !/ found in url spec:" + spec);
|
||||
}
|
||||
|
||||
jarFileURL = new URL(spec.substring(0, separator++));
|
||||
@SuppressWarnings("deprecation")
|
||||
var _unused = jarFileURL = new URL(spec.substring(0, separator++));
|
||||
|
||||
/*
|
||||
* The url argument may have had a runtime fragment appended, so
|
||||
* we need to add a runtime fragment to the jarFileURL to enable
|
||||
* runtime versioning when the underlying jar file is opened.
|
||||
*/
|
||||
if ("runtime".equals(url.getRef())) {
|
||||
jarFileURL = new URL(jarFileURL, "#runtime");
|
||||
@SuppressWarnings("deprecation")
|
||||
var _unused2 = jarFileURL = new URL(jarFileURL, "#runtime");
|
||||
}
|
||||
entryName = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue