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

Thread-safety and code-safety issue in BeanMap

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Bean-Collections
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: