It looks like a recent commit that removed some deprecated methods may not 
have gone far enough, as there is still code that makes use of those 
methods - the 
https://gwt.googlesource.com/gwt/+/f9630059081921b195ee4f7014e1a78c4b570f79 
commit dropped several methods from Tree and TreeItem, but the 'json' 
sample used those methods, so our nightly builds are seeing failures.

Source file that continues to use removed addItem methods:
https://gwt.googlesource.com/gwt/+/master/samples/json/src/com/google/gwt/sample/json/client/JSON.java

Build log errors:
compile:
    [mkdir] Created dir: 
/Users/colin/Documents/idea/gwt/build/out/samples/JSON/war/WEB-INF/classes
[gwt.javac] Compiling 1 source file to 
/Users/colin/Documents/idea/gwt/build/out/samples/JSON/war/WEB-INF/classes
[gwt.javac] 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java:132:
 
error: no suitable method found for addItem(String)
[gwt.javac]         TreeItem child = treeItem.addItem(getChildText("["
[gwt.javac]                                  ^
[gwt.javac]     method TreeItem.addItem(Widget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to Widget by 
method invocation conversion)
[gwt.javac]     method TreeItem.addItem(IsTreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsTreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(TreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to TreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(SafeHtml) is not applicable
[gwt.javac]       (actual argument String cannot be converted to SafeHtml 
by method invocation conversion)
[gwt.javac] 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java:139:
 
error: no suitable method found for addItem(String)
[gwt.javac]         TreeItem child = treeItem.addItem(getChildText(key));
[gwt.javac]                                  ^
[gwt.javac]     method TreeItem.addItem(Widget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to Widget by 
method invocation conversion)
[gwt.javac]     method TreeItem.addItem(IsTreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsTreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(TreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to TreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(SafeHtml) is not applicable
[gwt.javac]       (actual argument String cannot be converted to SafeHtml 
by method invocation conversion)
[gwt.javac] 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java:144:
 
error: no suitable method found for addItem(String)
[gwt.javac]       treeItem.addItem(jsonString.stringValue());
[gwt.javac]               ^
[gwt.javac]     method TreeItem.addItem(Widget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to Widget by 
method invocation conversion)
[gwt.javac]     method TreeItem.addItem(IsTreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsTreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(TreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to TreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(SafeHtml) is not applicable
[gwt.javac]       (actual argument String cannot be converted to SafeHtml 
by method invocation conversion)
[gwt.javac] 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java:147:
 
error: no suitable method found for addItem(String)
[gwt.javac]       treeItem.addItem(getChildText(jsonValue.toString()));
[gwt.javac]               ^
[gwt.javac]     method TreeItem.addItem(Widget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to Widget by 
method invocation conversion)
[gwt.javac]     method TreeItem.addItem(IsTreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsTreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(TreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to TreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(SafeHtml) is not applicable
[gwt.javac]       (actual argument String cannot be converted to SafeHtml 
by method invocation conversion)
[gwt.javac] 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java:154:
 
error: no suitable method found for addItem(String)
[gwt.javac]     TreeItem treeItem = jsonTree.addItem(errorType);
[gwt.javac]                                 ^
[gwt.javac]     method Tree.addItem(IsWidget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsWidget 
by method invocation conversion)
[gwt.javac]     method Tree.addItem(Widget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to Widget by 
method invocation conversion)
[gwt.javac]     method Tree.addItem(IsTreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsTreeItem 
by method invocation conversion)
[gwt.javac]     method Tree.addItem(TreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to TreeItem 
by method invocation conversion)
[gwt.javac]     method Tree.addItem(SafeHtml) is not applicable
[gwt.javac]       (actual argument String cannot be converted to SafeHtml 
by method invocation conversion)
[gwt.javac] 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java:155:
 
error: no suitable method found for addItem(String)
[gwt.javac]     treeItem.addItem(errorMessage);
[gwt.javac]             ^
[gwt.javac]     method TreeItem.addItem(Widget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to Widget by 
method invocation conversion)
[gwt.javac]     method TreeItem.addItem(IsTreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsTreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(TreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to TreeItem 
by method invocation conversion)
[gwt.javac]     method TreeItem.addItem(SafeHtml) is not applicable
[gwt.javac]       (actual argument String cannot be converted to SafeHtml 
by method invocation conversion)
[gwt.javac] 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java:166:
 
error: no suitable method found for addItem(String)
[gwt.javac]     TreeItem treeItem = jsonTree.addItem("JSON Response");
[gwt.javac]                                 ^
[gwt.javac]     method Tree.addItem(IsWidget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsWidget 
by method invocation conversion)
[gwt.javac]     method Tree.addItem(Widget) is not applicable
[gwt.javac]       (actual argument String cannot be converted to Widget by 
method invocation conversion)
[gwt.javac]     method Tree.addItem(IsTreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to IsTreeItem 
by method invocation conversion)
[gwt.javac]     method Tree.addItem(TreeItem) is not applicable
[gwt.javac]       (actual argument String cannot be converted to TreeItem 
by method invocation conversion)
[gwt.javac]     method Tree.addItem(SafeHtml) is not applicable
[gwt.javac]       (actual argument String cannot be converted to SafeHtml 
by method invocation conversion)
[gwt.javac] Note: 
/Users/colin/Documents/idea/gwt/samples/json/src/com/google/gwt/sample/json/client/JSON.java
 
uses or overrides a deprecated API.
[gwt.javac] Note: Recompile with -Xlint:deprecation for details.
[gwt.javac] 7 errors

Quick ideas:

   - Revert the commit
   - Modify addItem(String) to treat input as text instead of html
   - Rename addItem(String) to addItemHtml(String) and create an 
   addItemText(String) for proper safe usage
   - Drop this sample

A quick glance at http://gwt-ci.dempsky.org:8080/job/gwt/721/console 
suggests that while the regular build is running the tests, it is *not* 
compiling examples, so we aren't picking up on errors like this regularly. 
Can we modify this to not only do the test target, but also dist?

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to