GeoTools
  1. GeoTools
  2. GEOT-841

Class ArcSDEDataStore method getFeatureReader(String typeName, Query query) fired NullPointerException by use of Filter.ALL

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2-RC2
    • Fix Version/s: 2.5-M1
    • Component/s: arcsde plugin
    • Labels:
      None
    • Environment:
      ArcSDE 9.1 and Oracle 10g

      Description

      protected FeatureReader getFeatureReader(String typeName, Query query)
      throws IOException {
      ArcSDEQuery sdeQuery = null;
      FeatureReader reader = null;

      try {
      FeatureType schema = getSchema(typeName);

      // if Filter.ALL.equals(query.getFilter()) the following clall return null;
      sdeQuery = ArcSDEQuery.createQuery(this, schema, query);
      // so, this will fire a NullPointerExcetion
      sdeQuery.execute();

      please make the following change as workaround, until a ArcSDEFeatureReader is written.

      if (Filter.ALL.equals(query.getFilter()))

      { return new EmptyFeatureReader(schema); }
      sdeQuery = ArcSDEQuery.createQuery(this, schema, query);
      sdeQuery.execute();

      or better

      sdeQuery = ArcSDEQuery.createQuery(this, schema, query);
      if (sdeQuery == null) { return new EmptyFeatureReader(schema); }

      sdeQuery.execute();

      tschau

      Andreas

        Activity

        Show
        Gabriel Roldan added a comment - http://jira.codehaus.org/browse/GEOT-842

          People

          • Assignee:
            Gabriel Roldan
            Reporter:
            Andreas Bartels
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: