sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1690113 - /sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
Date Thu, 09 Jul 2015 14:14:20 GMT
Author: desruisseaux
Date: Thu Jul  9 14:14:20 2015
New Revision: 1690113

URL: http://svn.apache.org/r1690113
Log:
WKTFormat.getFactory(Class) should be consistent with GeodeticObjectParser constructor.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java?rev=1690113&r1=1690112&r2=1690113&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
[UTF-8] Thu Jul  9 14:14:20 2015
@@ -576,6 +576,15 @@ public class WKTFormat extends CompoundF
      */
     public <T extends Factory> T getFactory(final Class<T> type) {
         ensureValidFactoryType(type);
+        if (type == CoordinateOperationFactory.class) {
+            /*
+             * HACK: we have a special way to get the CoordinateOperationFactory because
of its dependency
+             * toward MathTransformFactory.  A lazy (but costly) way to ensure a consistent
behavior is to
+             * let the GeodeticObjectParser constructor do its job.  This is costly, but
should not happen
+             * often.
+             */
+            parser();
+        }
         return GeodeticObjectParser.getFactory(type, factories());
     }
 



Mime
View raw message