directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: [ApacheDS] Unnecessary casts in schema-bootstrap generated sources
Date Mon, 28 May 2007 07:12:07 GMT
Enrique Rodriguez a écrit :

> Hi, Directory developers,


> In the generated sources in 'apacheds-schema-bootstrap' there are many
> unnecessary casts, all in the same "setNames()" lines.  For example,
> in ApacheAttributeTypeProducer:79:
>        attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );

There was a velocity pattern which is used to generate those files, but 
as they have been generated once when we modified the Schema system, I'm 
not sure we can easily regenrate them (not sure).

> The cast to String[] is unnecessary.  The issue for me is this
> produces several hundred "unnecessary cast" warnings, possibly
> thousands, since my warnings are way past my listing limit (100 of
> ~11,000).

Can you simply disable the warning for this project (I guess you are 
using eclipse)

> Is this an easy fix somewhere?  I looked around the bootstrap-plugin
> and related files but it wasn't immediately obvious where the
> generated text was coming from.
> Want a JIRA?

Well, not sure this is necessary. We still have to fix all those 
warnings all over the code and it takes time, but - as you did today - 
we are doing it on the fly. However, you can create one if you feel so, 
it's not such a big deal to have one more JIRA !


View raw message