DO NOT REPLY [Bug 47779] New: ConcurrentModificationException in XMLUtils

View: New views
6 Messages — Rating Filter:   Alert me  

DO NOT REPLY [Bug 47779] New: ConcurrentModificationException in XMLUtils

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=47779

           Summary: ConcurrentModificationException in XMLUtils
           Product: Security
           Version: Java 1.4.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Signature
        AssignedTo: security-dev@...
        ReportedBy: mirko@...


--- Comment #0 from mirko@... 2009-09-03 06:00:21 PDT ---
XMLUtils.createElementInSignatureSpace is not threadsafe.

There is a chance of getting a ConcurrentModificationException if two threads
try to access this method at the same time because of an unsynchronized access
to the Hashtable named 'namePrefixes'.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47779] ConcurrentModificationException in XMLUtils

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=47779



--- Comment #1 from mirko@... 2009-09-03 06:44:25 PDT ---
Created an attachment (id=24204)
patch

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47779] ConcurrentModificationException in XMLUtils

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=47779


mirko@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24204|0                           |1
        is obsolete|                            |


--- Comment #2 from mirko@... 2009-09-03 06:51:14 PDT ---
Created an attachment (id=24205)
2nd patch

fixes the same problem in another method

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47779] ConcurrentModificationException in XMLUtils

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=47779



--- Comment #3 from coheigea <coheigea@...> 2009-09-04 08:43:32 PDT ---
Good catch! Would it not be better to just declare namePrefixes as:

Collections.synchronizedMap(new HashMap());

That would remove the call to Collections.unmodifiableMap each time the method
is invoked, as well as the synchronized block.

Colm.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47779] ConcurrentModificationException in XMLUtils

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=47779

coheigea <coheigea@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from coheigea <coheigea@...> 2009-10-08 04:31:22 PDT ---
Fix applied.

Colm.

--- Comment #5 from coheigea <coheigea@...> 2009-10-08 04:31:22 PDT ---
Fix applied.

Colm.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47779] ConcurrentModificationException in XMLUtils

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=47779

coheigea <coheigea@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from coheigea <coheigea@...> 2009-10-08 04:31:22 PDT ---
Fix applied.

Colm.

--- Comment #5 from coheigea <coheigea@...> 2009-10-08 04:31:22 PDT ---
Fix applied.

Colm.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.