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.

Bug 206417 - NPE when creating a directory in remote file chooser
Summary: NPE when creating a directory in remote file chooser
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-15 04:31 UTC by Vladimir Kvashin
Modified: 2012-06-09 13:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Full stack (9.96 KB, text/plain)
2011-12-15 04:31 UTC, Vladimir Kvashin
Details
Proposed fix (3.08 KB, patch)
2011-12-15 05:13 UTC, Vladimir Kvashin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2011-12-15 04:31:36 UTC
Created attachment 114204 [details]
Full stack

When browsing remote file system in file chooser,
try creating a directory - get a stable NPE at
org.netbeans.modules.remote.api.ui.FileChooserBuilder$RemoteFileChooserImpl.setCurrentDirectory(FileChooserBuilder.java:236)
Comment 1 Vladimir Kvashin 2011-12-15 04:37:33 UTC
I see two problems:

1) No null check at FileChooserBuilder$RemoteFileChooserImpl.setCurrentDirectory(FileChooserBuilder.java:236)

2) FileObjectBasedFile.getParentFile(FileObjectBasedFile.java:205) returns null if there are no associated file object
Comment 2 Vladimir Kvashin 2011-12-15 05:13:17 UTC
Created attachment 114205 [details]
Proposed fix
Comment 3 Alexander Pepin 2011-12-15 10:25:29 UTC
It should be fixed in 7.0.1 patch together with bug #204938
Comment 4 Vladimir Kvashin 2012-01-13 10:06:59 UTC
fixed in cnd-main:
http://hg.netbeans.org/cnd-main/rev/d264ae10e19e
in blacktie: rev/718e1732208e
Comment 5 Vladimir Kvashin 2012-01-13 15:30:13 UTC
Additional fix:
cnd-main: http://hg.netbeans.org/cnd-main/rev/ec76add66ca5
blacktie: rev/e20040a23ff8
Comment 6 Alexander Pepin 2012-01-13 17:23:43 UTC
Verified in build from blacktie.
Comment 7 Quality Engineering 2012-01-15 16:07:31 UTC
Integrated into 'main-golden', will be available in build *201201150601* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d264ae10e19e
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #206417 - NPE when creating a directory in remote file chooser
Comment 8 Vladimir Kvashin 2012-01-17 15:00:38 UTC
Integrated into release71_fixes:
http://hg.netbeans.org/releases/rev/5bec818f59f4
http://hg.netbeans.org/releases/rev/58ade76f6ed3
Comment 9 Alexander Pepin 2012-02-27 14:43:12 UTC
verified in 7.1.1 rc1 build (20120214)
Comment 10 Alexander Pepin 2012-06-09 13:13:41 UTC
Despite that bug is not reproducible any more another NPE still appears when a new directory is created from the remote file chooser dialog, see bug #213875