Affects Version/s: 1.0.7 beta
Fix Version/s: 1.0.8 beta
The JSF spec doesn't go into much detail about the way that the
Application needs to search for a converter for a given Object type.
Currently, we only search a Class' direct interfaces and, recursively,
its superclasses for a match. This can be problematic if the
converter definition refers to an interface. The only checking will
be for its direct parents.
Here is an example outlining my problem:
Descriptor, Active, Identifiable
ModelBase extends Descriptor
Organization extends Active, Identifiable, ModelBase
DescriptorImpl implements Descriptor
ModelBaseImpl extends DescriptorImpl implements ModelBase
OrganizationImpl extends ModelBaseImpl implements Organization
This means that if I register my Converter on a Descriptor and a JSF
component needs to find a Converter for an Organization, it will not
find one because the search will go something like this:
Organization = no match
search interfaces: Active = no match
Identifiable = no match
ModelBase = no match
search superclass: null = no match
Of course, we should just recursively search the interfaces as well.
Preferably, we would want users to be able to define a different
Converter for a Descriptor and an Organization with confidence that
the Organization would always get an OrganizationConverter.
That outlines the bug, which I intend to fix. The real question is
one of strategy.
Here are the strategies we could use:
A: use Class.isAssignableFrom(Class) on each key in the
_converterTypeMap to match the Class to a converter, then get that
converter from the Map. There could be additional algorithms employed
to choose between multiple matches.
B: When checking an interface, we just see if it is present in the
Map. We could execute the internalCreateConverter(Class) method on
it, so that its SuperInterfaces will be searched.
|Workflow||MyFaces Workflow [ 12359361 ]||MyFaces Workflow2 [ 12359950 ]|
|Workflow||MyFaces Workflow [ 12358760 ]||MyFaces Workflow2 [ 12359361 ]|
|Workflow||MyFaces Workflow [ 12358271 ]||MyFaces Workflow2 [ 12358760 ]|
|Workflow||MyFaces Workflow [ 12357270 ]||MyFaces Workflow2 [ 12358271 ]|
|Workflow||MyFaces Workflow2 [ 12355564 ]||MyFaces Workflow [ 12357270 ]|
|Workflow||MyFaces Workflow [ 12354042 ]||MyFaces Workflow2 [ 12355564 ]|
|Workflow||MyFaces Workflow2 [ 12349923 ]||MyFaces Workflow [ 12354042 ]|
|Workflow||MyFaces Workflow [ 12347893 ]||MyFaces Workflow2 [ 12349923 ]|
|Workflow||MyFaces Workflow [ 12347893 ]||MyFaces Workflow2 [ 12349844 ]|
|Workflow||MyFaces Workflow [ 12347893 ]||MyFaces Workflow2 [ 12349822 ]|
|Workflow||jira [ 38713 ]||MyFaces Workflow [ 12347893 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Resolution||Fixed [ 1 ]|
|Assignee||Manfred Geiler [ manolito ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Fix Version/s||1.0.8 beta [ 10972 ]|