Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8126167

WebHistory API looks inconsistent

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 7u6
    • Component/s: javafx
    • Labels:
    • Subcomponent:
      web

      Description

      It is probably too late to bring this up but I find the current WebHistory API somewhat inconsistent.

      First, I find it a little odd that WebHistory.go throws an exception if the resulting position is out of bounds, whereas WebHistory.goBack and WebHistory.goForward, in conceptually the same situation, do not throw any exceptions and silently act as no-ops.

      I think I also find little value in WebHistory.goBack and WebHistory.goForward without WebHistory.canGoBack and WebHistory.canGoForward, as I can achieve the same results with go(-1) and go(+1), which is more compact and by definition consistent with other uses of WebHistory.go.

      I also think that the WebHistory.maxSize property should throw an exception when the user attempts to set it to an illegal value, for consistency with WebHistory.go and the rest of JavaFX.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ant Anton Tarasov
                Reporter:
                vbaranov Vasiliy Baranov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: