http://gwt-code-reviews.appspot.com/1441803/diff/4001/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java File dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java (right):
http://gwt-code-reviews.appspot.com/1441803/diff/4001/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java#newcode407 dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java:407: } On 2011/05/11 23:42:11, scottb wrote:
That makes total sense. Then I would suggest either the update()
method as
described, or perhaps better yet, a new quick copy constructor that
takes
additional lastModifed and location and otherwise copies all values
from the old
guy, just to give the new unit a new identity and keep the
immutability.
Otherwise, someone who already has a reference to the old unit could
observe
that unit to change. Makes debugging trickier too.
I believe that's essentially what I did in patch set 2 - the old unit is copied with asCachedCompilationUnit() and then I update the values in the copy. Maybe I should rename asCachedCompilationUnit() to something else to make that more clear? http://gwt-code-reviews.appspot.com/1441803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
