http://gwt-code-reviews.appspot.com/1123801/diff/1/2
File dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
(right):

http://gwt-code-reviews.appspot.com/1123801/diff/1/2#newcode879
dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java:879:
return fullMethodName.substring(index + 2);
I think this will crash when you pass an empty string, a string of size
1, or any string that ends with ::.

http://gwt-code-reviews.appspot.com/1123801/diff/1/2#newcode903
dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java:903:
return packageAndClass.substring(0, endIndex);
Nit: You could get away without having to do two .substring calls (as
they're expensive).

return packageAndClass.substring(0, packageAndClass.lastIndexOf('.'));
instead of the last 3 lines.

(Actually, can there ever be a . after a ::?  If not, then you can just
do
return packageAndClass.substring(0, packageAndClass.lastIndexOf('.'));
for the whole method).

http://gwt-code-reviews.appspot.com/1123801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to