mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8252767: URLConnection.setRequestProperty throws IllegalAccessError
Reviewed-by: chegar, michaelm, alanb
This commit is contained in:
parent
2cceeedfe1
commit
5dd1eaded7
2 changed files with 132 additions and 34 deletions
|
@ -71,7 +71,7 @@ public abstract class URLConnection extends java.net.URLConnection {
|
|||
|
||||
public void setRequestProperty(String key, String value) {
|
||||
if(connected)
|
||||
throw new IllegalAccessError("Already connected");
|
||||
throw new IllegalStateException("Already connected");
|
||||
if (key == null)
|
||||
throw new NullPointerException ("key cannot be null");
|
||||
properties.set(key, value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue