#4 race condition fix: bug 1931255

closed
nobody
None
5
2009-01-11
2008-04-15
Matt Bastress
No

Fixed version if MethodProxy.java that uses a volatile invariant to initialize the four fields involved in the race condition.

This eliminates the condition that causes the wrong method invocation. The invariant may still be initialized twice in Java 1.4 and earlier because of the semantics of volatile in those versions.

With Java 5 the double-checked lock with volatile will prevent multiple initializations.

Discussion

  • Matt Bastress
    Matt Bastress
    2008-04-15

    modified MethodProxy.java

     
    Attachments
  • Fixed

     
    • status: open --> closed