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 199098

Summary: NullPointerException at java.io.FileInputStream.<init>
Product: editor Reporter: Vladimir Kvashin <vkvashin>
Component: RefactoringAssignee: Jan Becicka <jbecicka>
Status: RESOLVED FIXED    
Severity: normal CC: issues
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 179131
Attachments: stacktrace
The proposed fix

Description Vladimir Kvashin 2011-06-02 05:51:32 UTC
This bug was originally marked as duplicate of bug 161476, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.0.1 Dev (Build 20110601-a6246788774d)
VM: Java HotSpot(TM) Server VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
OS: Linux

User Comments:
vkvashin: Tried rename refactoring in full remote project




Stacktrace: 
java.lang.NullPointerException
   at java.io.FileInputStream.<init>(FileInputStream.java:103)
   at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultImpl.copy(BackupFacility.java:270)
   at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultImpl.backup(BackupFacility.java:209)
   at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultImpl.backup(BackupFacility.java:195)
   at org.netbeans.modules.refactoring.spi.BackupFacility.backup(BackupFacility.java:122)
   at org.netbeans.modules.cnd.refactoring.support.RefactoringCommit.commit(RefactoringCommit.java:86)
Comment 1 Vladimir Kvashin 2011-06-02 05:51:37 UTC
Created attachment 108665 [details]
stacktrace
Comment 2 Jan Becicka 2011-06-02 06:14:25 UTC
What is "full remote project"?
Comment 3 Vladimir Kvashin 2011-06-02 06:17:00 UTC
This is a project that reside on other file system, not masterfs.
Comment 4 Vladimir Kvashin 2011-06-02 06:21:55 UTC
I guess the reason is that in BackupFacility.java:209 we use FileUtil.toFile(file) and are copying files instead of just fileobjects.
Comment 5 Vladimir Kvashin 2011-06-02 06:25:06 UTC
Created attachment 108666 [details]
The proposed fix
Comment 6 Vladimir Kvashin 2011-06-02 06:25:54 UTC
I tried the fix attached, it works.
I'd like to push it if you don't mind.
Comment 7 Jan Becicka 2011-06-02 07:01:44 UTC
OK. Looks safe. Please push it.
Comment 8 Vladimir Kvashin 2011-06-02 08:30:32 UTC
I pushed it into releases701 as due to intensive work on 7.01 bugfixing cnd team is working in releases701 branch (and we need this change badly). It will be transplanted automatically into trunk (cnd-main trunk) today.
Comment 9 Vladimir Kvashin 2011-06-02 08:30:52 UTC
http://hg.netbeans.org/releases/rev/c15b74450dd5
Comment 10 Quality Engineering 2011-06-03 18:19:17 UTC
Integrated into 'main-golden', will be available in build *201106031000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1bb455c8668c
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #199098 - NullPointerException at java.io.FileInputStream.<init>
(transplanted from c15b74450dd5975afb78b3f2ae5cbca41a61417c)