Uploaded image for project: 'Bloomreach Forge'
  1. Bloomreach Forge
  2. FORGE-23

Prevent NPEs in Feed beans

    XMLWordPrintable

Details

    Description

      There are three bean classes provided by the plugin in the package org.onehippo.forge.feed.beans. Some of the getters return multivalue properties. But if for some reason the actual property is not found on the node the code in the beans produces a null pointer exception. This is an example:

      public List<String> getCategory() {
             String[] catgries = getProperty("feed:category");
              return Arrays.asList(catgries);
      }
      

      The argument to the #asList method may not be null.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bleunis Bert Leunis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: