Uploaded image for project: 'Click'
  1. Click
  2. CLK-308

Illegal page parameter to Table incurs NumberFormatException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      TRUNK

      Description

      NumberFormatException is thrown when an illegal(not 'Integer#toInt()' capable string) request parameter "page" value comes to the table,

      Table onRender() method should sanitize a parameter. I prefer fixing the page to zero when a not-a-number string comes in.

        Activity

        Hide
        medgar Malcolm Edgar added a comment -

        Hi Satoshi,

        what is the use case for an invalid page parameter coming through? I want to know if the Table is generating an invalid parameter.

        regards Malcolm Edgar

        Show
        medgar Malcolm Edgar added a comment - Hi Satoshi, what is the use case for an invalid page parameter coming through? I want to know if the Table is generating an invalid parameter. regards Malcolm Edgar
        Hide
        choreo takata, satoshi added a comment -

        Hi Malcolm,

        The Table itself has no problem.
        But somehow people copied the wrong URL of my clickframework based service, and the search engine picked it up...
        I just could not bear the multiple error logging per day. I already use a custom subclassed Table so to avoid redirecting to error page.

        Throwing runtime exception for illegal parameter may be logical, whereas handling any string as a number could be a little kinder.
        This is more of a preference than a bug.

        Show
        choreo takata, satoshi added a comment - Hi Malcolm, The Table itself has no problem. But somehow people copied the wrong URL of my clickframework based service, and the search engine picked it up... I just could not bear the multiple error logging per day. I already use a custom subclassed Table so to avoid redirecting to error page. Throwing runtime exception for illegal parameter may be logical, whereas handling any string as a number could be a little kinder. This is more of a preference than a bug.
        Hide
        medgar Malcolm Edgar added a comment -

        Fixed checked into SVN and will be available in release 1.4 Final.

        regards Malcolm Edgar

        Show
        medgar Malcolm Edgar added a comment - Fixed checked into SVN and will be available in release 1.4 Final. regards Malcolm Edgar

          People

          • Assignee:
            medgar Malcolm Edgar
            Reporter:
            choreo takata, satoshi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development