Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      128

      Description

      For twitter search feeds, partial implementation of OpenSearch causes an NPE.

      Sample Feed URL that demonstrates the problem:
      http://search.twitter.com/search.atom?q=Streetofeames

      Exception: Caused by: java.lang.NullPointerException
      com.sun.syndication.feed.module.opensearch.impl.OpenSearchModuleParser.parse(OpenSearchModuleParser.java:80)

      Fix: Wrap itemsPerPage and startIndex in 'if (e != null)' like is done with
      totalResults already:

      e = dcRoot.getChild("itemsPerPage", OS_NS);

      if (e != null) {
      foundSomething = true;

      try

      { osm.setItemsPerPage(Integer.parseInt(e.getText())); }

      catch(NumberFormatException ex)

      { // Ignore setting the field and post a warning System.err.println("Warning: The element itemsPerPage must be an integer value: " + ex.getMessage()); }

      }

      e = dcRoot.getChild("startIndex", OS_NS);

      if (e != null) {
      foundSomething = true;

      try

      { osm.setStartIndex(Integer.parseInt(e.getText())); }

      catch(NumberFormatException ex)

      { // Ignore setting the field and post a warning System.err.println("Warning: The element startIndex must be an integer value: " + ex.getMessage()); }

      }

        Activity

        Hide
        buckett added a comment -

        Created an attachment (id=40)
        The changes the reported suggested as a patch.

        Show
        buckett added a comment - Created an attachment (id=40) The changes the reported suggested as a patch.

          People

          • Assignee:
            rome-issues
            Reporter:
            jnadler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: