Uploaded image for project: 'Commons Crypto'
  1. Commons Crypto
  2. CRYPTO-90

Utils loads system properties during class loading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None

    Description

      The Utils class reads properties from a properties file if it exists, and adds them to the set of System properties.

      There are several problems with this:

      • there's no way of knowing exactly when the properties will be processed, because it depends when the Utils class is first used
      • generally it's a bad idea to update System properties.
      • updates to System properties require additional privileges, so the behaviour of the code will depend on the environment in which it is run.
      • the code catches Throwable, which is not allowed.

      If there is a use case for supporting a properties file, it should be processed at a predictable stage in the code, should be done before command-line parameters are processed, and should not require updating System properties.

      Attachments

        Issue Links

          Activity

            People

              dapengsun Dapeng Sun
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: