LGTM On Tue, May 11, 2010 at 11:06 PM, <[email protected]> wrote:
> Reviewers: Ray Ryan, > > Description: > Added error-checking to SampleDataPopulator and updated the example in > dataPopulator. > > Patch by: amitmanjhi > Review by: rjrjr (TBR) > > > Please review this at http://gwt-code-reviews.appspot.com/511801/show > > Affected files: > M trunk/bikeshed/scripts/dataPopulator > M > trunk/bikeshed/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java > > > Index: trunk/bikeshed/scripts/dataPopulator > =================================================================== > --- trunk/bikeshed/scripts/dataPopulator (revision 8094) > +++ trunk/bikeshed/scripts/dataPopulator (working copy) > @@ -14,7 +14,7 @@ > # License for the specific language governing permissions and limitations > under > # the License. > > -# example invocation: ./dataPopulator > http://127.0.0.1:8888/expenses/data$PWD/expensesJsonData.txt > +# example invocation: ./dataPopulator > http://127.0.0.1:8888/gwtRequest$PWD/expensesJsonData.txt > > # the first argument should be the URL. > # the second argument is the pathname of the file to be read. > Index: > trunk/bikeshed/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java > =================================================================== > --- > trunk/bikeshed/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java > (revision 8094) > +++ > trunk/bikeshed/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java > (working copy) > @@ -43,6 +43,11 @@ > System.exit(-1); > } > try { > + if (!args[0].endsWith(RequestFactory.URL)) { > + System.err.println("Please check your URL string " + args[0] > + + ", it should end with " + RequestFactory.URL + ", exiting"); > + System.exit(-1); > + } > SampleDataPopulator populator = new SampleDataPopulator(args[0], > args[1]); > populator.populate(); > } catch (Exception ex) { > > > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
