Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 124966 - NullPointerException when click Revert button
NullPointerException when click Revert button
Status: VERIFIED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
http://statistics.netbeans.org/analyt...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-09 15:45 UTC by Jiri Skrivanek
Modified: 2008-01-18 07:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Proposed patch (1.23 KB, text/plain)
2008-01-16 17:04 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2008-01-09 15:45:29 UTC
NPE is thrown when you click Revert button and revisions are not yet resolved. To reproduce:

- open a file versioned in Mercurial
- make a local change and save file
- call "Mercurial|Revert Modifications" and immediatelly click Revert button. The exception is thrown probably because
combo box with revisions is not yet populated.

Mercurial Pluging: 1.4.3.42.1
Mercurial Runtime: 0.9.5
Product Version: NetBeans IDE Dev (Build 20080109120642)
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)
Userdir: D:\Development\builds\nbUserdir-Hg
Comment 1 John Rice 2008-01-16 16:57:50 UTC
Can't reproduce - can you attach a stack trace.
Comment 2 John Rice 2008-01-16 17:04:51 UTC
Created attachment 55159 [details]
Proposed patch
Comment 3 John Rice 2008-01-16 17:06:39 UTC
Checked to see where this could be arising and have added check for null revision string. The revert will still work but
it will just default to the following action:

    With no revision specified, revert the named files or directories
    to the contents they had in the parent of the working directory.
Comment 4 John Rice 2008-01-16 17:09:46 UTC
IDE:-------------------------------------------------
IDE: [16/01/08 17:09] Committing started
Checking in RevertModificationsPanel.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsPanel.java,v
 <--  RevertModificationsPanel.java
new revision: 1.8; previous revision: 1.7
done
IDE: [16/01/08 17:09] Committing finished
IDE: [16/01/08 17:09] Diffing finished
Comment 5 Jiri Skrivanek 2008-01-18 07:26:23 UTC
Verified.


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