提交 db20276b 编写于 作者: J jzavgren

4880778: URL final class has protected methods

Summary: The two set() methods have been defined to be package private.
Reviewed-by: alanb, chegar, khazra
上级 14f7c5d6
......@@ -661,8 +661,8 @@ public final class URL implements java.io.Serializable {
* @param file the file on the host
* @param ref the internal reference in the URL
*/
protected void set(String protocol, String host,
int port, String file, String ref) {
void set(String protocol, String host, int port,
String file, String ref) {
synchronized (this) {
this.protocol = protocol;
this.host = host;
......@@ -698,9 +698,9 @@ public final class URL implements java.io.Serializable {
* @param query the query part of this URL
* @since 1.3
*/
protected void set(String protocol, String host, int port,
String authority, String userInfo, String path,
String query, String ref) {
void set(String protocol, String host, int port,
String authority, String userInfo, String path,
String query, String ref) {
synchronized (this) {
this.protocol = protocol;
this.host = host;
......
......@@ -509,8 +509,8 @@ public abstract class URLStreamHandler {
/**
* Sets the fields of the <code>URL</code> argument to the indicated values.
* Only classes derived from URLStreamHandler are supposed to be able
* to call the set method on a URL.
* Only classes derived from URLStreamHandler are able
* to use this method to set the values of the URL fields.
*
* @param u the URL to modify.
* @param protocol the protocol name.
......@@ -539,8 +539,8 @@ public abstract class URLStreamHandler {
/**
* Sets the fields of the <code>URL</code> argument to the indicated values.
* Only classes derived from URLStreamHandler are supposed to be able
* to call the set method on a URL.
* Only classes derived from URLStreamHandler are able
* to use this method to set the values of the URL fields.
*
* @param u the URL to modify.
* @param protocol the protocol name. This value is ignored since 1.2.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册