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

No exceptions specified for SocketPermission constructor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      x86
    • OS:
      linux

      Description

      In class level specification something like BNF for constructor parameter is specified. However behavior in case of violation of such grammar is not specified.

      JDK usually throws IAE however absense of expection specification means that other implementations may behave in different manner violating "compile once run everywhere" idea.

      Yet sometimes JDK does not throw any exception event if grammar is violated:

      * '*' is allowed as port number violating rule
          portrange = portnumber | -portnumber | portnumber-[portnumber]
      * port number may be empty while ':' is used violating rule
          host = (hostname | IPv4address | iPv6reference) [:portrange]
      * lead/trailng spaces are allowed in action names
      * action comparison looks case-insentive (while it is specified nowhere)

      I thing it would be useful to add something like "IAE is thrown if grammar for either host or action is violated" and clarify case-sensitivity for actions (for hostnames it is clear that they are case-insensitivy as consequrence of RFCs for DNS).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michaelm Michael McMahon
              Reporter:
              sreznick Sergey Reznick (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: