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

            raven.song Raven Song
            dante.wang Dante Wang
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 17 weeks, 5 days ago

              Packages

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