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

Boolean.getBoolean() throws SecurityException

    XMLWordPrintable

Details

    • b08
    • sparc
    • solaris_9
    • Verified

    Description

      Boolean.getBoolean() does not list SecurityException in its throws clause.
      It may mislead people to think that this method can be used instead of
      System.getProperty() to get around security constraints. But it actually throws
      SecurityException.

      If it is intended that it should not throw SecurityException, privileged code block
      should be used when calling System.getProperty().

      Same problem applies to

      Integer.getInteger()
      Long.getLong()

      ###@###.### 2005-05-10 21:40:38 GMT

      Attachments

        Activity

          People

            darcy Joe Darcy
            xwangsunw Xiaozhong Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: