Martin Desruisseaux wrote:
> Your approach preserve compatibility, but on the other hand
> ReferencingFactoryFinder
> was added in 2.4, so we are allowed to change it (while I admit that it is
> late
> in the release process).
>
Fair enough; Andrea and Justin are the only people likely to freek out.
And I think they are hampered by this bug
as well?
> Your approach is a two step process:
> 1) create ReferencingFactoryFinder(Hints)
> 2) invoke createFooFactory()
>
True; you can do this as one line if you want.
new ReferencingFactoryFinder( hints ).getCRSAuthorityFactory("EPSG");
And the import "null" case is still a single line.
ReferencingFactoryFinder.DEFAULT.getCRSAuthorityFactory("EPSG");
Updated your examples inline:
> The old approach was a one step process:
>
1) ReferencingFactoryFinder.getCRSAuthorityFactory( "EPSG", hints );
> * Your approach is more convenient if a given code will create many factories
> in a row with the same hints.
>
Check; this is something I have done a few times. But not many.
> * The old approach is more convenient if we typically create only one factory
> in a given piece of code.
I find my approach easier in this case?
> or if we create many factories with different hints.
>
agreed on this one.
> In order to answer that question, I looked yesterday how
> ReferencingFactoryFinder is used in GeoTools code. I found:
>
> ~50% of cases invoking createFooFactory(null);
> ~50% of cases using some hints, I have not estimated the percentage
> of isolated factories versus factories created in a row.
>
> Conclusion: for now I have been unable to make my mind.
>
Nice research; I would go with the proposal as it stands now - we have
plenty left to do.
Jody
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel