diff options
Diffstat (limited to 'libjava/classpath/java/net/URLConnection.java')
-rw-r--r-- | libjava/classpath/java/net/URLConnection.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/classpath/java/net/URLConnection.java b/libjava/classpath/java/net/URLConnection.java index 836f174dae6..b4a55a01a34 100644 --- a/libjava/classpath/java/net/URLConnection.java +++ b/libjava/classpath/java/net/URLConnection.java @@ -598,6 +598,9 @@ public abstract class URLConnection */ public void setAllowUserInteraction(boolean allow) { + if (connected) + throw new IllegalStateException("Already connected"); + allowUserInteraction = allow; } @@ -776,7 +779,7 @@ public abstract class URLConnection * * @param key The name of the property * - * @return Value of the property + * @return Value of the property, or <code>null</code> if key is null. * * @exception IllegalStateException If already connected * |