Jody Garnett a écrit : > I am not sure I like backwards compatibility over consistency. Ie if > we are going to break people let's at least do it with a usability > goal in mind. > > The other alternative is: > > GeoTools 2.5.x: > - getRulesArray() - returns an array > - getRules() - deprecated > > GeoTools 2.6.x > - getRulesArray() - returns getRules().toArray( new Rule[0] ); > - getRules() - return a List > > We sat through this change before in order to have a consistent use... > Jody We talked about this at the last meeting, the two solutions we found were : - getRulesArray() or - rules()
I talked with martin about it and the 'rules()' seems to be the best solution. GeoAPI method returns a List or Collection, it's supposed to be a 'living' collection so there is no reason to have a 'set' method. If we have a 'get' method without the 'set' it's a bit strange. The other reason is : we will be able to use the new styles in 2.5 : GeoTools 2.5.x: - getRules() - deprecated - returns rules().toArray( new Rule[0] ); - rules() - returns List<Rule> GeoTools 2.6.x - rules() - returns List<Rule> > > johann sorel wrote: >> Hello, >> >> Proposal : http://docs.codehaus.org/display/GEOTOOLS/Upgrading+styles >> >> >> We have a found a solution to upgrade GeoTools style interface >> without breaking backward compatibility. >> >> The problem we had was "Array versus Collection" : >> >> -In GeoTools we have : Rule[] getRules(); >> -In GeoAPI we have : List<Rule> getRules(); >> (same thing for FeatureTypeStyles and Symbolizers) >> >> Seens both methods have the same signature we would break backward >> compatibility. >> >> Here is the solution we applied : >> Renaming GeoAPI method in : List<Rule> rules(); >> >> I will be on IRC meeting today if you have question. >> If you have no objections please vote. >> If you have objections please tell us what is the problem and we will >> try to find a solution. >> >> >> regards >> >> > > > -- Johann Sorel Company - Geomatys GIS Developer Mail - [EMAIL PROTECTED] ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel