commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bugs #11512] Weird URL() behaviour.


From: anonymous
Subject: [commit-cp] [bugs #11512] Weird URL() behaviour.
Date: Thu, 06 Jan 2005 20:43:11 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219 Firefox/1.0 (Debian package 1.0+dfsg.1-1)

This mail is an automated notification from the bugs tracker
 of the project: classpath.




/**************************************************************************/
[bugs #11512] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11512>
Project: classpath
Submitted by: 0
On: Fri 01/07/2005 at 01:27

Category:  classpath
Severity:  5 - Average
Resolution:  None
Privacy:  Public
Assigned to:  None
Status:  Open
Platform Version:  None


Summary:  Weird URL() behaviour.

Original Submission:  
1) Weird Exception about SSLv3 with jamvm/classpath.
   It does not happen with kaffe-cvs.  The code still 
   continues.

2) If the url is in form "http://host"; it should be implicit
   that the file part is "/".  This is also Sun's behaviour.

3) Why IllegalArgumentException, not MalformedURLException?

-----------------
import java.io.InputStream;
import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException;
public class TestURL {
    public static void main(String [] args) {
        try {
            URL url = new URL("http://www.classpath.org";);
            InputStream in = url.openStream();
            System.out.println("Got InputStream");
        } catch (MalformedURLException ex) {
            System.out.println("MalformedURLException");
        } catch (IOException ex) {
            System.out.println("IOException");
        }
    }
}
----------------
$ jamvm-cvs TestURL
WARNING: could not properly read security provider files:
         file:///opt/java/classpath/lib/security/JamVM.security
         file:///opt/java/classpath/lib/security/classpath.security
         Falling back to standard GNU security provider
java.lang.RuntimeException: error instantiating default socket factory: 
java.security.NoSuchAlgorithmException: SSLv3
   at javax.net.ssl.SSLSocketFactory.getDefault (SSLSocketFactory.java:144)
   at javax.net.ssl.HttpsURLConnection.<clinit> (HttpsURLConnection.java:85)
   at gnu.java.net.protocol.http.Handler.openConnection (Handler.java:69)
   at java.net.URL.openConnection (URL.java:670)
   at java.net.URL.openStream (URL.java:683)
   at TestURL.main (TestURL.java:9)
java.lang.IllegalArgumentException: path must have non-zero length
   at gnu.java.net.protocol.http.HTTPConnection.newRequest 
(HTTPConnection.java:369)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect 
(HTTPURLConnection.java:201)
   at gnu.java.net.protocol.http.HTTPURLConnection.getInputStream 
(HTTPURLConnection.java:448)
   at java.net.URL.openStream (URL.java:683)
   at TestURL.main (TestURL.java:9)

$ kaffe-cvs TestURL
java.lang.IllegalArgumentException: path must have non-zero length
   at gnu.java.net.protocol.http.HTTPConnection.newRequest 
(HTTPConnection.java:369)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect 
(HTTPURLConnection.java:201)
   at gnu.java.net.protocol.http.HTTPURLConnection.getInputStream 
(HTTPURLConnection.java:448)
   at java.net.URL.openStream (URL.java:683)
   at TestURL.main (TestURL.java:9)












For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11512>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]