cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 124887 - Show History throws NPE
: Show History throws NPE
Status: VERIFIED WORKSFORME
: versioncontrol
Mercurial
: 6.1
: PC Windows XP
: P2 (vote)
: 6.1
Assigned To:
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-01-08 13:58 by
Modified: 2008-01-14 14:51 (History)
Issue Type: DEFECT
:


Attachments
Proposed patch (1.83 KB, text/plain)
2008-01-11 23:56, John Rice
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-01-08 13:58:23
NullPointerException is thrown when you call Show History command. To
reproduce:

- hg clone http://hg.netbeans.org/main
- open main/openide.util
- open org.openide.LifecycleManager.java
- call 'Mercurial|Show History' but it fails with NPE and it the output window
is printed history but project name is null:

INFO History for file(s):
[D:\Development\hg\main\openide.util\src\org\openide\LifecycleManager.java]
INFO Project Name:   null


Mercurial Pluging: 1.4.3.42.1
Mercurial Runtime: 0.9.5
Product Version: NetBeans IDE Dev (Build 20080107122025)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
------- Comment #1 From 2008-01-09 11:41:40 -------
This works for me on Solaris. I get a project name of "Utilities API".

We should avoid the NPE if project name is null.
------- Comment #2 From 2008-01-11 23:52:33 -------
Can't reproduce this on Windows XP with plugin from CVS Head. Added some
additional checking to avoid NPE in the
getProjectName() code.

INFO History for file(s):
[C:\main\openide.util\src\org\openide\LifecycleManager.java]
INFO Project Name:   Utilities API

If you can reproduce it, please reopen and attach the stack trace for the NPE.
------- Comment #3 From 2008-01-11 23:56:02 -------
Created an attachment (id=54984) [details]
Proposed patch
------- Comment #4 From 2008-01-11 23:58:18 -------
IDE:-------------------------------------------------
IDE: [11/01/08 23:57] Committing started
Checking in HgProjectUtils.java;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgProjectUtils.java,v
 <--  HgProjectUtils.java
new revision: 1.10; previous revision: 1.9
done
IDE: [11/01/08 23:57] Committing finished
------- Comment #5 From 2008-01-14 14:51:05 -------
Verified. It works for me with latest plugin.