Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 124887 - Show History throws NPE
Show History throws NPE
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
PC Windows XP
: P2 (vote)
: 6.x
Assigned To: issues@versioncontrol
Depends on:
  Show dependency treegraph
Reported: 2008-01-08 13:58 UTC by Jiri Skrivanek
Modified: 2008-01-14 14:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT

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

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2008-01-08 13:58:23 UTC
NullPointerException is thrown when you call Show History command. To reproduce:

- hg clone
- open main/openide.util
- open
- 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\]
INFO Project Name:   null

Mercurial Pluging:
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 Padraig Obriain 2008-01-09 11:41:40 UTC
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 John Rice 2008-01-11 23:52:33 UTC
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\]
INFO Project Name:   Utilities API

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

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo