You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Dave Brosius <db...@qis.net> on 2005/05/03 05:57:05 UTC

Lil confused by code -- please take a look

In org.apache.xalan.xsltc.dom.NodeSortRecord

In the method:

    public final void initialize(int node, int last, DOM dom,
         SortSettings settings)

Is the following lines (line 112-114 in my copy of the source)

                Object candObj = ObjectFactory.findProviderClass(
                    colFactClassname, ObjectFactory.findClassLoader(), true);
                _collatorFactory = (CollatorFactory)candObj;


It seems to me that findProviderClass returns a Class - type object.
So the assignment to a CollatorFactory - inferface seems to me to be wrong.

Or am i confused?

--dave


Re: Lil confused by code -- please take a look

Posted by Henry Zongaro <zo...@ca.ibm.com>.
Hi, Dave.

"Dave Brosius" <db...@qis.net> wrote on 2005-05-02 11:57:05 PM:
> In org.apache.xalan.xsltc.dom.NodeSortRecord
> 
> In the method:
> 
>     public final void initialize(int node, int last, DOM dom,
>          SortSettings settings)
> 
> Is the following lines (line 112-114 in my copy of the source)
> 
>                 Object candObj = ObjectFactory.findProviderClass(
>                     colFactClassname, ObjectFactory.findClassLoader(), 
true);
>                 _collatorFactory = (CollatorFactory)candObj;
> 
> 
> It seems to me that findProviderClass returns a Class - type object.
> So the assignment to a CollatorFactory - inferface seems to me to be 
wrong.

     Yes, it looks like that code would throw a ClassCastException if it 
were ever exercised.  Could I ask you to open a bug report in Jira[1] for 
this problem?

Thanks,

Henry
[1] http://issues.apache.org/jira/
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org