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

PrinterJob.getUserName() throws a security exception when user.name permission is not given

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b117
    • CPU:
      generic
    • OS:
      generic

      Description

      PrinterJob.getUserName() is supposed to return the current user name of the system. This method does not document any exception. But when SecurityManager is installed, this method throws a security exception when PropertyPermission - user.name is not given in the policy file. But this is not documented anywhere and hence the user will not know until he gets the exception. This must be documented.

      This is reproducible on all platforms since 1.3.

      Make sure you have a policy file with a 'QueuePrintJob' permission. Run the attached test. If you see an AccessControlException on the console asking for user.name permission, the bug is reproduced.
      ###@###.### 2004-11-18 11:52:09 GMT

        Attachments

          Activity

            People

            Assignee:
            psadhukhan Prasanta Sadhukhan
            Reporter:
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: