JTSGeometryFactory failure to resolve GeometryFactory
-----------------------------------------------------

                 Key: GEOT-1979
                 URL: http://jira.codehaus.org/browse/GEOT-1979
             Project: GeoTools
          Issue Type: Bug
            Reporter: Jody Garnett
            Assignee: Jody Garnett
             Fix For: 2.5-RC0


In updating some old code today we tried making the transition from 
FactoryFinder to JTSFactoryFinder. This produced the a failure to resolve 
GeometryFactory error message.

Turns out the code does this:
{code}
    private static FactoryRegistry getServiceRegistry() {
        assert Thread.holdsLock(JTSFactoryFinder.class);
        if (registry == null) {
               registry = new Registry();
        }
        return registry;
    }
{code}

After reviewing the CommonFactoryFinder implementation it looks like the 
following correction is in order:
{code}
    private static FactoryRegistry getServiceRegistry() {
        assert Thread.holdsLock(JTSFactoryFinder.class);
        if (registry == null) {
            registry = new FactoryCreator(Arrays.asList(new Class<?>[ ]{ 
GeometryFactory.class } );
        }
        return registry;
    }
{code}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to