Bug 772749

Summary: NPE thrown in content repository view when view is empty
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: Core UIAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.2CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-07 19:29:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 760116    

Description John Sanda 2012-01-09 21:08:56 UTC
Description of problem:
When the content repository view is empty, there is a single node named 'root'. If you select that node, you will see a globally uncaught exception in the UI. The actual exception is a NPE in ContentRepositoryTreeView.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Log into an RHQ server that has no content repositories.
2. Click the 'Bundles' link from the menu at the top of the page.
3. The 'Repositories' view will be on the bottom left. Click on the header to expand the section.
4. Then click on 'root' row/folder.
  
Actual results:
A globally uncaught exception is reported in the UI.

Expected results:
No exception should be thrown/reported.

Additional info:

Comment 1 John Sanda 2012-01-09 21:27:13 UTC
Added a null check for when there are no repos.

master commit hash: 2c2d2aeffc8dd7adf3e0f60711f9556b52355baf

Comment 2 Mike Foley 2012-01-16 18:43:23 UTC
verified rhq 4.3

Comment 3 Mike Foley 2012-02-07 19:29:11 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

Comment 4 Mike Foley 2012-02-07 19:30:05 UTC
marking VERIFIED BZs to CLOSED/CURRENTRELEASE