GwtSpecificValidatorCreator generates wrong code for annotations with long value

Bug-Link: https://github.com/gwtproject/gwt/issues/9288
Change-Id: Ib1c9956f51c4e4fdc601db7abb825b73c5b62ef9
diff --git a/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java b/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
index 1350bb8..853a599 100644
--- a/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
+++ b/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
@@ -184,7 +184,7 @@
     } else if (value instanceof Integer) {
       return JIntLiteral.get(((Integer) value).intValue()).toSource();
     } else if (value instanceof Long) {
-      return JLongLiteral.get(((Long) value).intValue()).toSource();
+      return JLongLiteral.get(((Long) value).longValue()).toSource();
     } else if (value instanceof String) {
       return '"' + Generator.escape((String) value) + '"';
     } else {
diff --git a/user/test/com/google/gwt/validation/rebind/GwtSpecificValidatorCreatorTest.java b/user/test/com/google/gwt/validation/rebind/GwtSpecificValidatorCreatorTest.java
index ae62513..868b34a 100644
--- a/user/test/com/google/gwt/validation/rebind/GwtSpecificValidatorCreatorTest.java
+++ b/user/test/com/google/gwt/validation/rebind/GwtSpecificValidatorCreatorTest.java
@@ -71,6 +71,10 @@
     assertLiteral("1L", 1L);
   }
 
+  public void testAsLiteral_9999999999L() {
+    assertLiteral("9999999999L", 9999999999L);
+  }
+
   public void testAsLiteral_a() {
     assertLiteral("'a'", 'a');
   }