swingx
  1. swingx
  2. SWINGX-1540

ErrorInfo contructor iterates through System Properties unsafely

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.5
    • Fix Version/s: None
    • Component/s: Error
    • Labels:
      None

      Description

      The ErrorInfo constructor iterates through the System properties using a for-each loop. Since it uses a live view of the system properties, a concurrent modification of the system properties could result in a ConcurrentModificationException (thrown by HashTable's enumerator when it detects a change in the number of keys).

      Instead of iterating across the live properties' entry set, the constructor should iterate across the result of the propertyNames() method, which is synchronized and returns a defensive copy, at least preventing conflicts with other classes that use Properties's synchronized mutators.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            rah003
            Reporter:
            MattLeidholm
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: