Bug 108697

Summary: Dodgy handling of nulls in DomainObjectFactory
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel BerrangĂ© <berrange>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED WONTFIX QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
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: 2006-09-02 17:27:03 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:

Description Daniel Berrangé 2003-10-31 10:36:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.9 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
There are two bits of code in DomainObjectFactory which do not handle nulls
correctly. This has two effects:

 * It is possible to register an instantiator against a 'null' object type.
 * When recursively looking up instantiators for parent objects types, it will
eventually look up an instantiator for a 'null' object type.

If something accidently registers an instantiator against 'null' type (eg
through typo in the object type string they pass in), then anything which
doesn't have an explicit instantantiator registered suddenly resolves to this
instantiator. 

This is already fixed in Troika & Rickshaw, but needs to be backported to 5.2 as
well

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


How reproducible:
Always

Steps to Reproduce:
1. Register an instantiator against a type which doesn't exist
2. Try & instantiate an object for which no instanatiator is found
3.
    

Actual Results:  It tries to use the instantiator registered against 'null'
object type

Expected Results:  It throws an instantiator not found exception.

Additional info:

p4 change 33290 is suitable for direct application to the 5.2 branch

Comment 1 Daniel Berrangé 2006-09-02 17:27:03 UTC
Closing old tickets