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.
I tried to open a file using the following path \\192.168.1.102\c$\projects\myproject\main\dev\java\com\mypackage\package1\package2\package2\Source.java and i got the a NullPointerException. Here is what i did. File->"Open File". Then I entered \\192.168.1.102\c$\projects\myproject\main\dev\java\com\mypackage\package1\package2\package2 as the file name and clicked Open. That's when i got the NPE.
Created attachment 18066 [details] netbeans log file
Created attachment 18087 [details] the exception (excerpt from the log)
The exception should not be thrown, I agree. I changed a code in the OpenFile pseudo-module but I am not yet able to test whether it helps or not. (I need more time for the check because I need to setup computers for such a task.) I would appreciate if you tried the daily build and reported how did the change affect NetBeans' behaviour. Modified file: utilities/: src/org/netbeans/modules/openfile/DefaultOpenFileImpl.java (1.8) (I modified the file twice - at first made revision 1.7, then 1.8)
So I tried how it behaves now, after the first modification: The NPE is no longer thrown but nothing else happens - neither the file is open nor an error message is displayed. I am currently working on a patch such that the user gets a message that the selected file cannot be open because of UNC not being supported.
Fixed in the trunk. When the user specifies a file by UNC path, a message dialog appears, informing the user that UNC paths are not supported. The Utilities module supports two ways of opening files - from the command-line argument (netbeans -open <filename>) or by the Open File action (available from the File menu). The dialog is open in both cases. In case of the Open File action, the dialog is displayed in the file chooser _before_ the file chooser is closed. Modified files: utilities/src/org/netbeans/modules/openfile/ Bundle.properties (1.36) OpenFile.java (1.59) FileChooser.java (1.5)