This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The URLs produced by remote filesystem (protocol 'rfs') are not behaving in a consistent way with regular URLs. One cannot call on their connection c.getInputStream() on them without previous call to c.connect(). Here would be the proposed fix (no test): --- RemoteFileURLConnection.java (BASE) +++ Locally Modified (Based On LOCAL) @@ -98,6 +98,9 @@ @Override public InputStream getInputStream() throws IOException { if (fileObject == null) { + connect(); + } + if (fileObject == null) { throw newFileNotFoundException(); } if (iStream == null) {
If a remote machine is not connected, then the existing disk cache will be used. If there are no cache then - empty input stream will be returned. - a balloon that prompts for connection appears - once connection is established, file change event should be fired for such a file This allows working offline. Making connect right here is not a good idea: as soon as there is no connection, user will be bored to death with this connection prompts.
I was connected still I could not obtain input stream for URL of clearly existing file.
Sorry, I just didn't get you right. Now I see. Fixed http://hg.netbeans.org/releases/rev/b7fd0bc4afa8
Thanks for fix and nice test.
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/b7fd0bc4afa8 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fix and test for #199200 - can't getInputStream() without connect()
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/bb7fce8f6e05 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fix and test for #199200 - can't getInputStream() without connect() (transplanted from b7fd0bc4afa89b028cf44330a08ac0fecac2fc83)