Mike-

Thanks for looking into this problem so carefully.  If you want to
create a bug report, you can do so at

   http://jira.codehaus.org/browse/CASTOR

If you, please include your proposed fix as it will be a great help in
starting the investigation on our end.  But your solution sounds like
a good one, and it should be a pretty easy fix.

Thanks,
Stephen


On 4/4/06, Mike Gozaloff <[EMAIL PROTECTED]> wrote:
>
> Thomas,
>
> I ran across the same problem today.  After debugging through the source, it
> appears to be a logic problem in SchemaWriter.  In the (many) places where
> it checks the list of cached included schemas to see if a type is defined in
> an include, the boolean field "found" is not handled correctly.  It retains
> the value from the last included schema - not all the included schemas as it
> should.  This makes the writer  define (inline) all types in all included
> schemas except the last schema in the _cachedincludedSchemas Hashtable.
>
> A simple change from this:
>          while (includedSchemas.hasMoreElements())
> to this:
>          while (includedSchemas.hasMoreElements() && !found)
>
> in all the places the included schemas are checked, should kick it out of
> the loop (retaining the value of found) and fix the problem.
>
> I have not tested this fix nor figured out how to submit a Castor bug yet.
>
> FWIW,
>
> gozer
>
>
> --
> View this message in context: 
> http://www.nabble.com/problem-while-doing-Schema.cacheIncludedSchema%28%29-twice-t1333266.html#a3757332
> Sent from the Castor - User forum at Nabble.com.
>
>
> -------------------------------------------------
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -------------------------------------------------
>
>

Reply via email to