http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java File user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java (right):
http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1645 user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1645: private void writeFieldNullCheck(IndentedWriter niceWriter, OwnerField ownerField) { Would it be OK to perform this test only if not running in prod mode? "if (!GWT.isProdMode() && owner ... http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1651 user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1651: niceWriter.write("}"); This change in behavior needs a test. Unfortunately we do not have a tests for UiBinderWriter when generating code for UiBinder interfaces. UiRendererValidationTest is very similar to what you want, though. It tests the generation of UiRenderer interfaces. Relies on AbstractUiBinderWriterTest to set up a mock TypeOracle, fill it with classes and set up all classes needed by UiBinderWriter. You will want to add the ability to AbstractUiBinderWriterTest to define useSafeHtmlTemplates and useLazyWidgetBuilders instead of setting them to true. See AbstractUiBinderWriterTest#init() second to last line. Also add mock classes that use UiBinder (instead of UiRenderer) and the @UiField annotations you need. http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1683 user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1683: writeFieldNullCheck(niceWriter, ownerField); I think this code is not reached when using lazy widget binding, which will be the default in a not so long future. The same issue would be present in that case. It would be nice to fix it there too. See #writeBinderForRenderableStrategy() http://gwt-code-reviews.appspot.com/1486801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
