portletspec3
  1. portletspec3
  2. PORTLETSPEC3-20

Errata: Clarification in Javadoc for an illegal scope use in PortletSession methods

    Details

      Description

      Some PortletSession attribute get methods do not specify their behavior when they are invoked with an unknown container scope:

      • PortletSession#getAttribute(String,int)
      • PortletSession#getAttributeNames(int)
      • PortletSession#getAttributeMap(int)
      • PortletSession#removeAttribute(String,int)

      There are other methods of the PortletSession interface that must throw an IllegalArgumentException when the parameter null is provided such as PortletSession#setAttribute(String,Object,int): "java.lang.IllegalArgumentException if name is <code>null</code> or scope is unknown to the container."

      We should change clarify how the getAttribute

      The possible correction are:
      1. the methods should fail fail with throwing an `IllegalArgumentException`
      2. the methods should ignore it (return null or empty map)

      The removeAttribute method should likely be corrected to 1. as the setAttribute(String,Object,int) says clearly "If the value is <code>null</code>, this has the same effect as calling
      removeAttribute()".

      The three other methods could use 1 or 2.

        Activity

        julien_viet created issue -
        msnicklous made changes -
        Field Original Value New Value
        Assignee msnicklous [ msnicklous ]
        msnicklous made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        msnicklous made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            msnicklous
            Reporter:
            julien_viet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: