This seems like two completely unrelated changes that should be
committed separately.  I'll let Eric comment on the CompiledClass
change, here's my 2 cents on the SAXParser change.


http://gwt-code-reviews.appspot.com/1438801/diff/1/dev/core/src/com/google/gwt/dev/util/xml/ReflectiveParser.java
File dev/core/src/com/google/gwt/dev/util/xml/ReflectiveParser.java
(right):

http://gwt-code-reviews.appspot.com/1438801/diff/1/dev/core/src/com/google/gwt/dev/util/xml/ReflectiveParser.java#newcode66
dev/core/src/com/google/gwt/dev/util/xml/ReflectiveParser.java:66: }
Two concurrency issues here:

1) You might initialize saxParserFactory twice if two threads come in at
the same time.

2) Even after solving that, there's the problem that you'll be using the
same Factory from multiple threads concurrently.  Are you 100% sure
that's ok?  If so, you should document why it's safe.  If not, you need
to lock around the call to newSAXParser().  (Or maybe just turn this
method into "private static synchronized SAXParser
createNewSaxParser()".)

http://gwt-code-reviews.appspot.com/1438801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to