On 2011/11/30 20:26:19, jat wrote: http://gwt-code-reviews.appspot.com/1604804/diff/1/user/src/com/google/gwt/junit/FakeCssMaker.java
File user/src/com/google/gwt/junit/FakeCssMaker.java (right):
http://gwt-code-reviews.appspot.com/1604804/diff/1/user/src/com/google/gwt/junit/FakeCssMaker.java#newcode44
user/src/com/google/gwt/junit/FakeCssMaker.java:44: FakeCssMaker.class.getClassLoader(), new Class[] {cssClass}, Is this the right classloader to use? FakeCssMaker is part of GWT,
while
cssClass will typically be a user class.
I suggest using the thread context classloader instead.
Interesting comment. Under what circumstances would they be in different classloaders? The JUnit testing environment for which this class is intended shouldn't have multiple classloaders. Then again, if that somehow occurred then I would think that the right classloader would be that of 'cssClass', so maybe it's worth revisiting. For what it's worth, this is the same technique that FakeMessagesMaker uses without issue. I submitted the change prior to seeing your comment, but I'm happy to make the change to both this and FakeMessagesMaker if you think it has value. http://gwt-code-reviews.appspot.com/1604804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors