Hello Jody
Jody Garnett a écrit :
> Hi Martin I finally figured out why this conversation was going sideways
> on me; you can perform this transition in a compatible way... note you
> should probably comment out these static methods while you make the
> transition; and we can add them back into the mix (deprecated if you
> want) for the 2.5.0 release.
Yes I understood that your proposal was along that line. Both approachs are
functionnaly equivalent - they differ only in the place where the Hints are
given (contructor in your proposal, by-methods in the old approach). 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).
Your approach is a two step process:
1) create ReferencingFactoryFinder(Hints)
2) invoke createFooFactory()
The old approach was a one step process:
1) invoke createFooFactory(Hints)
Since they are both functionnaly equivalent, the only question that popup in my
mind is "which approach is the most convenient?"
* Your approach is more convenient if a given code will create many factories
in a row with the same hints.
* The old approach is more convenient if we typically create only one factory
in a given piece of code, or if we create many factories with different hints.
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.
Martin
-------------------------------------------------------------------------
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