Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-74517

PortletServletRequest.getIntHeader doesn't correctly implement HttpServletRequest interface

    Details

      Description

      As stated in the JavaDoc of HttpServletRequest.getIntHeader:

      Returns the value of the specified request header as an int. If the request does not have a header of the specified name, this method returns -1. If the header cannot be converted to an integer, this method throws a NumberFormatException.
      

      In Liferay's PortletServletRequest, this method uses GetterUtil.getInteger with default value "0", and it doesn't throw NumberFormatException.

      This is also the case with PortletServletRequest.getDateHeader

        Attachments

          Activity

            People

            Assignee:
            raven.song Raven Song
            Reporter:
            dante.wang Dante Wang
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 3 weeks ago

                Packages

                Version Package
                7.0.0 DXP FP31
                7.0.5 CE GA6
                7.0.X
                7.1.X
                Master