Reviewers: jat,

Description:
Fix compilation on JDK 1.5


Please review this at http://gwt-code-reviews.appspot.com/1369802/

Affected files:
  M user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
  M user/src/com/google/gwt/user/server/rpc/XsrfTokenServiceServlet.java
M user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java


Index: user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
===================================================================
--- user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java (revision 9775) +++ user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java (working copy)
@@ -96,7 +96,7 @@
     Cookie sessionCookie = Util.getCookie(getThreadLocalRequest(),
         sessionCookieName, false);
     if (sessionCookie == null || sessionCookie.getValue() == null ||
-        sessionCookie.getValue().isEmpty()) {
+        sessionCookie.getValue().length() == 0) {
       throw new RpcTokenException("Session cookie is missing or empty! " +
           "Unable to verify XSRF cookie");
     }
Index: user/src/com/google/gwt/user/server/rpc/XsrfTokenServiceServlet.java
===================================================================
--- user/src/com/google/gwt/user/server/rpc/XsrfTokenServiceServlet.java (revision 9775) +++ user/src/com/google/gwt/user/server/rpc/XsrfTokenServiceServlet.java (working copy)
@@ -190,7 +190,7 @@
     Cookie sessionCookie = Util.getCookie(getThreadLocalRequest(),
         sessionCookieName, false);
     if (sessionCookie == null || sessionCookie.getValue() == null ||
-        sessionCookie.getValue().isEmpty()) {
+        sessionCookie.getValue().length() == 0) {
       throw new RpcTokenException("Session cookie is not set or empty! " +
           "Unable to generate XSRF cookie");
     }
Index: user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
===================================================================
--- user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java (revision 9775) +++ user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java (working copy)
@@ -465,7 +465,7 @@
sw.println(".setConstrained(" + beanDescriptor.isBeanConstrained() + ")");

     int count = 0;
- for (ConstraintDescriptor<? extends Annotation>constraint : beanDescriptor.getConstraintDescriptors()) { + for (ConstraintDescriptor<?> constraint : beanDescriptor.getConstraintDescriptors()) {
       // .add(c0)
       sw.println(".add(" + constraintDescriptorVar("this", count++) + ")");
     }


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

Reply via email to