Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-1678

bean:size and logic:iterate throws JSPException if collection is null

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: Nightly Build
    • Fix Version/s: None
    • Component/s: Tag Libraries
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      22382

      Description

      bean:size throws JSPException if tested collection is null. It forces using
      logic:present before.

      Is it not simpler, to return size equal to 0 if tested collection does not exist?

      The same concept could be used for logic:iterate.

      It is generally correct, that contract between JSP and backand is "no bean, no
      result". Such contract saves some memory. But if external library returns
      Colelction you must explicite check if it is empty or not, means overhead for
      any such case.

      Proposed extension simplifies development and secure application against methods
      returning sometimes null and sometimes empty collection.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              radzimir@polbox.com Radoslaw Wisniewski
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: