public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bkonrath at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcj/21637] New: URL.openStream doesn't throw a FileNotFoundException with some urls Date: Tue, 17 May 2005 22:43:00 -0000 [thread overview] Message-ID: <20050517224304.21637.bkonrath@redhat.com> (raw) Version: gcc-java-4.0.0-5 from FC4 rawhide Test Case: import java.io.IOException; import java.io.InputStream; import java.net.URL; public class URLTest { public static void main(String[] args) throws IOException { // replace this with any jar on your system // that doesn't have /blah.txt in it. String jar = "/path/to/jar/bork.jar"; URL url = new URL("jar:file:" + jar + "!/blah.txt"); InputStream is = url.openStream(); System.out.println("InputStream: " + is); } } Result of running with gij: InputStream: null Result of running with Sun's VM: Exception in thread "main" java.io.FileNotFoundException: JAR entry blah.txt not found in /usr/share/eclipse/plugins/org.eclipse.osgi_3.1.0.jar at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:97) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:107) at java.net.URL.openStream(URL.java:913) at URLTest.main(URLTest.java:12) -- Summary: URL.openStream doesn't throw a FileNotFoundException with some urls Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bkonrath at redhat dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21637
next reply other threads:[~2005-05-17 22:43 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-05-17 22:43 bkonrath at redhat dot com [this message] 2005-05-19 5:35 ` [Bug libgcj/21637] " tromey at gcc dot gnu dot org 2005-05-20 20:02 ` cvs-commit at gcc dot gnu dot org 2005-05-20 20:03 ` tromey at gcc dot gnu dot org 2005-07-01 22:15 ` pinskia at gcc dot gnu dot org 2005-07-02 0:10 ` tromey at gcc dot gnu dot org 2005-07-08 1:42 ` mmitchel at gcc dot gnu dot org 2005-09-27 18:21 ` [Bug libgcj/21637] [4.1 Regression] " pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050517224304.21637.bkonrath@redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).