harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r376014 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/net/URLConnection.java test/java/org/apache/harmony/tests/java/net/AllTests.java
Date Wed, 08 Feb 2006 18:05:26 GMT
Author: tellison
Date: Wed Feb  8 10:05:11 2006
New Revision: 376014

URL: http://svn.apache.org/viewcvs?rev=376014&view=rev
Log:
Fix for HARMONY-71 (java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError)
Fix for HARMONY-72 (java.net.URLConnection.setAllowUserInteraction (boolean b) throws unspecified
SecurityException)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/AllTests.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java?rev=376014&r1=376013&r2=376014&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLConnection.java
Wed Feb  8 10:05:11 2006
@@ -35,7 +35,7 @@
 /**
  * The URLConnection class is responsible for establishing a connection to an
  * URL for a given protocol. The correct URLConnection subclass to call is
- * deteremined by <code<URLStreamHandler.openConnection().
+ * determined by <code>URLStreamHandler.openConnection()</code>.
  */
 public abstract class URLConnection {
 	protected URL url;
@@ -727,13 +727,13 @@
 	 * @param newValue
 	 *            the value of the flag to be set
 	 * 
-	 * @throws SecurityException
+	 * @throws IllegalStateException
 	 *             if this method attempts to change the flag after a connection
 	 *             has been established
 	 */
 	public void setAllowUserInteraction(boolean newValue) {
 		if (connected) {
-			throw new SecurityException(Msg.getString("K0037"));
+			throw new IllegalStateException(Msg.getString("K0037"));
 		}
 		this.allowUserInteraction = newValue;
 	}
@@ -908,7 +908,7 @@
 	 * @param newValue
 	 *            the value of the flag to be set
 	 * 
-	 * @throws IllegalAccessError
+	 * @throws IllegalStateException
 	 *             Exception thrown when this method attempts to change the
 	 *             value after connected
 	 * 
@@ -916,11 +916,10 @@
 	 * @see #setDefaultUseCaches
 	 * @see #getUseCaches
 	 * @see #useCaches
-	 * @see java.lang.IllegalAccessError
 	 */
 	public void setUseCaches(boolean newValue) {
 		if (connected) {
-			throw new IllegalAccessError(Msg.getString("K0037"));
+			throw new IllegalStateException(Msg.getString("K0037"));
 		}
 		this.useCaches = newValue;
 	}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/AllTests.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/AllTests.java?rev=376014&r1=376013&r2=376014&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/AllTests.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/AllTests.java
Wed Feb  8 10:05:11 2006
@@ -32,6 +32,7 @@
 		suite.addTestSuite(InetAddressTest.class);
 		suite.addTestSuite(URLTest.class);
 		suite.addTestSuite(URITest.class);
+		suite.addTestSuite(URLConnectionTest.class);
 		//$JUnit-END$
 		return suite;
 	}



Mime
View raw message