Uploaded image for project: 'GeoTools'
  1. GeoTools
  2. GEOT-5508

A NPE can occur when calling CompoundCurve.isRectangle()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 14.5, 15.1, 16-M0
    • Fix Version/s: 15.2, 16-beta
    • Component/s: api
    • Labels:
      None

      Description

      When calling the isRectangle() method on a CompoundCurve it can throw a NullPointerException because the linearized member has not been initialized. A typical stacktrace looks like:

      java.lang.NullPointerException
      	at org.geotools.geometry.jts.CompoundCurve.isRectangle(CompoundCurve.java:377)
      	at org.geotools.geometry.jts.CompoundRing.isRectangle(CompoundRing.java:158)
      	at org.geotools.data.oracle.sdo.GeometryConverter.toSDO(GeometryConverter.java:172)
      	at org.geotools.data.oracle.OracleDialect.setGeometryValue(OracleDialect.java:596)
      	at org.geotools.jdbc.JDBCDataStore.insertSQLPS(JDBCDataStore.java:4161)
      	at org.geotools.jdbc.JDBCDataStore.insert(JDBCDataStore.java:1675)
      	at org.geotools.jdbc.JDBCDataStore.insert(JDBCDataStore.java:1638)
      	at org.geotools.jdbc.JDBCInsertFeatureWriter.write(JDBCInsertFeatureWriter.java:76)
      	at org.geotools.data.InProcessLockingManager$1.write(InProcessLockingManager.java:337)
      	at org.geotools.data.store.ContentFeatureStore.addFeature(ContentFeatureStore.java:309)
      	at org.geotools.data.store.ContentFeatureStore.addFeatures(ContentFeatureStore.java:263)
      	at nl.b3p.brmo.loader.gml.BGTGMLLightLoader.storeFeatureCollection(BGTGMLLightLoader.java:404)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mprins Mark Prins
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: