ICEfaces
  1. ICEfaces
  2. ICE-3793

NumberFormatException on incorrect rvn parameter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.8DR#2, 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      All

      Description

      If a use sets accidentally/intentionally the rvn parameter in the url to an incorrect value the following exception is thrown:

      java.lang.NumberFormatException: For input string: "1test"
      java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      java.lang.Integer.parseInt(Integer.java:456)
      java.lang.Integer.parseInt(Integer.java:497)
      com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:50)
      com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
      com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
      com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
      com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
      com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
      com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
      com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
      com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

      It may be better than handle this in a more graceful way.

        Activity

        Hide
        Mircea Toma added a comment -

        Arran,

        Do you have a use case in mind that would require this king of graceful handling? I believe is better to fail fast that hide the errors. Applying heuristics to hide the errors usually will cause other errors or unexpected behavior later on.

        Show
        Mircea Toma added a comment - Arran, Do you have a use case in mind that would require this king of graceful handling? I believe is better to fail fast that hide the errors. Applying heuristics to hide the errors usually will cause other errors or unexpected behavior later on.
        Hide
        Arran Mccullough added a comment -

        The use case that was sent it from the supported customer was that the focus was accidentally put on the url input when it was supposed to be on an input text on the form. The user then typed in a string and hit enter expecting it to be for the form input text and not the url.

        Show
        Arran Mccullough added a comment - The use case that was sent it from the supported customer was that the focus was accidentally put on the url input when it was supposed to be on an input text on the form. The user then typed in a string and hit enter expecting it to be for the form input text and not the url.
        Hide
        Mircea Toma added a comment -

        Create new view when identifier cannot be recognized.

        Show
        Mircea Toma added a comment - Create new view when identifier cannot be recognized.

          People

          • Assignee:
            Unassigned
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: