Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-377

Thread-safety and code-safety issue in BeanMap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Bean-Collections
    • None

    Description

      BeanMap declares the following static field:

      public static HashMap defaultTransformers = new HashMap();
      

      This is unsafe, as any code can change the map. The map is not currently used outside the class; it should be made private and final, as it is not intended to be used except within the class.

      Attachments

        1. collections.pat
          0.7 kB
          Hasan Diwan

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: