< prev index next >
src/share/classes/sun/net/www/URLConnection.java
Print this page
rev 1564 : 7090158: Networking Libraries don't build with javac -Werror
7125055: ContentHandler.getContent API changed in error
Summary: Minor changes to networking java files to remove warnings
Reviewed-by: chegar, weijun, hawtin, alanb
Contributed-by: kurchi.subhra.hazra@oracle.com, sasha_bu@hotmail.com
*** 1,7 ****
/*
! * Copyright (c) 1995, 2006, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1995, 2011, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 24,39 ****
*/
package sun.net.www;
import java.net.URL;
- import java.net.ContentHandler;
import java.util.*;
- import java.io.InputStream;
- import java.io.OutputStream;
- import java.io.BufferedInputStream;
- import java.net.UnknownServiceException;
/**
* A class to represent an active connection to an object
* represented by a URL.
* @author James Gosling
--- 24,34 ----
*** 97,107 ****
}
public Map<String,List<String>> getRequestProperties() {
if (connected)
throw new IllegalStateException("Already connected");
! return Collections.EMPTY_MAP;
}
public String getHeaderField(String name) {
try {
getInputStream();
--- 92,102 ----
}
public Map<String,List<String>> getRequestProperties() {
if (connected)
throw new IllegalStateException("Already connected");
! return Collections.emptyMap();
}
public String getHeaderField(String name) {
try {
getInputStream();
< prev index next >