CoordinateOperationAuthorityFactory.createFromCoordinateReferenceSystemCodes(source, target) produces a StackOverflowError when the following conditions are meet:
- (longitude, latitude) axis order is forced on a system-wide basis using the "org.geotools.referencing.forceXY" system property.
- A SQL-backed EPSG factory (like the epsg-hsql plugin) is in the classpath.
Initial investigation suggests that Geotools get trapped in infinite recursivity with method calls bouncing between AuthorityBackedFactory and OrderedAxisAuthorityFactory (indirectly, since there is many level of indirection). The following code reproduces the problem: