Bug 32523

Summary: NPE discarding location when there are no locations
Product: [Eclipse Project] Platform Reporter: Rafael Chaves <eclipse>
Component: TeamAssignee: Boris Shingarov <bshingar>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P1    
Version: 2.1   
Target Milestone: 2.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
This also solves the "global and context enablement out of sync" problem none

Description Rafael Chaves CLA 2003-02-21 17:49:31 EST
Build 200302211557

In the CVS Repositories view, a NPE is generated discarding a location when 
there is no locations created.

Steps to reproduce:

1 - Open a new workspace
2 - Open the CVS Repositories view
3 - Open the context menu in this view area: "Discard location" option is 
enabled (shouldn't)
4 - Select "Discard location" (bug happens)

An entry for the NPE in the log is generated. Top entries in stack trace are:

java.lang.NullPointerException
at 
org.eclipse.team.internal.ccvs.ui.repo.RemoveRootAction.getSelectedRemoteRoots
(RemoveRootAction.java:49)
at org.eclipse.team.internal.ccvs.ui.repo.RemoveRootAction.run
(RemoveRootAction.java:72)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:841)
...
Comment 1 Boris Shingarov CLA 2003-02-28 15:50:11 EST
Created attachment 3795 [details]
This also solves the "global and context enablement out of sync" problem
Comment 2 Boris Shingarov CLA 2003-03-03 16:50:44 EST
Patch has been applied