Bug 113122
| Summary: | Application#retrieveAllApplications() also returns instances of c.a.kernel.Resource which aren't Applications | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Web Application Framework | Reporter: | Daniel Berrangé <berrange> |
| Component: | other | Assignee: | Justin Ross <jross> |
| Status: | CLOSED RAWHIDE | QA Contact: | Jon Orris <jorris> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | nightly | CC: | vnasardinov |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-01-26 22:28:04 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 106481 | ||
*** Bug 113629 has been marked as a duplicate of this bug. *** Fixed in perforce change 39647. |
Description of problem: The Application#retrieveAllApplications() returns a collection of Application instances. Except that, because it uses the same database table as the c.a.kernel.Resource class, it also includes instances of objects which are not Applications, eg Portals & Portlets. This causes an Assertion to fail in the ApplicationCollection class. For example: ApplicationCollection apps = Application.retrieveAllApplications(); while (apps.next()) { Application app = apps.getApplication(); ... do stuff ... } Results in: com.arsdigita.util.AssertionError: Value of application is null. at com.arsdigita.util.Assert.error(Assert.java:532) at com.arsdigita.util.Assert.assertTrue(Assert.java:372) at com.arsdigita.util.Assert.assertNotNull(Assert.java:396) at com.arsdigita.web.ApplicationCollection.getApplication(ApplicationCollection.java:99) at com.arsdigita.london.util.cmd.SiteMapList.doRun(SiteMapList.java:39) at com.arsdigita.london.util.Program.run(Program.java:221) at com.arsdigita.london.util.cmd.SiteMapList.main(SiteMapList.java:56) Error: Value of application is null. When it hits the first non-Application object. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: