Community
Participate
Working Groups
See Bug 191694. Currently it is possible to have an invalid file (no location or URI) on construction of a FileEditorInput. We should throw an IllegalArgumentException like we do for a null file.
Fix released in build >20070813
Hmm.. this change makes it illegal to create a FileEditorInput on a file that is not in the local file system. While this avoids clients getting an NPE from getLocation(), it prevents the use case for which we created IURIEditorInput, etc.
So what is your suggestion John? Should be leave it as it was in 3.3 and warn in the constructor about this. The other option is to be more aggressive about the PartInitException and throw it when this case occurs in the constructor. Also from an EFS point of view are we preventing updates?
We have decided on a more conservative path in the end. We will not be doing this in the constructor as it adds subtle behavioural issues to getURI. We will now throw an IllegalArguementException rather than an NPE and I have added a static method isLocalFile to allow developers to check without having to catch IllegalArgumentException.
An entry has also been added to the porting guide.
Verified in I20070918-0100 by code inspection