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

jconsole script demo defines confirm function with wrong return value

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 6
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b95
    • CPU:
      generic
    • OS:
      generic

      Description

      As a demo of both jconsole plugins and JavaScript support, we ship a jconsole plugin that presents an interactive JavaScript shell. This shell predefines a bunch of useful functions, many of them modeled after standard JavaScript (DOM 0) functions. In particular it defines a confirm function, which users are like to invoke like the standard window.confirm <http://developer.mozilla.org/en/docs/DOM:window.confirm>. But the return values of the standard function is a boolean that is true if the user confirms and false if the user cancels. The return value of the function defined in jconsole.js is 0 if the user clicks Yes and 1 if the user clicks No. This makes the function nearly unusable.

      Of course this is only a demo, but it can in fact be exploited to make useful things, so what it provides should work.

        Attachments

          Activity

            People

            • Assignee:
              sundar Sundararajan Athijegannathan
              Reporter:
              emcmanus Eamonn McManus
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: