Imported Upstream version 3.8.0
[platform/upstream/protobuf.git] / java / core / src / test / java / com / google / protobuf / DeprecatedFieldTest.java
index 9c0997c..2addde8 100644 (file)
@@ -41,35 +41,28 @@ import junit.framework.TestCase;
  * @author birdo@google.com (Roberto Scaramuzzi)
  */
 public class DeprecatedFieldTest extends TestCase {
-  private String[] deprecatedGetterNames = {
-      "hasDeprecatedInt32",
-      "getDeprecatedInt32"};
+  private String[] deprecatedGetterNames = {"hasDeprecatedInt32", "getDeprecatedInt32"};
 
   private String[] deprecatedBuilderGetterNames = {
-      "hasDeprecatedInt32",
-      "getDeprecatedInt32",
-      "clearDeprecatedInt32"};
+    "hasDeprecatedInt32", "getDeprecatedInt32", "clearDeprecatedInt32"
+  };
 
-  private String[] deprecatedBuilderSetterNames = {
-      "setDeprecatedInt32"};
+  private String[] deprecatedBuilderSetterNames = {"setDeprecatedInt32"};
 
   public void testDeprecatedField() throws Exception {
     Class<?> deprecatedFields = TestDeprecatedFields.class;
     Class<?> deprecatedFieldsBuilder = TestDeprecatedFields.Builder.class;
     for (String name : deprecatedGetterNames) {
       Method method = deprecatedFields.getMethod(name);
-      assertTrue("Method " + name + " should be deprecated",
-          isDeprecated(method));
+      assertTrue("Method " + name + " should be deprecated", isDeprecated(method));
     }
     for (String name : deprecatedBuilderGetterNames) {
       Method method = deprecatedFieldsBuilder.getMethod(name);
-      assertTrue("Method " + name + " should be deprecated",
-          isDeprecated(method));
+      assertTrue("Method " + name + " should be deprecated", isDeprecated(method));
     }
     for (String name : deprecatedBuilderSetterNames) {
       Method method = deprecatedFieldsBuilder.getMethod(name, int.class);
-      assertTrue("Method " + name + " should be deprecated",
-          isDeprecated(method));
+      assertTrue("Method " + name + " should be deprecated", isDeprecated(method));
     }
   }
 
@@ -77,8 +70,7 @@ public class DeprecatedFieldTest extends TestCase {
     Class<?> oneofCase = TestDeprecatedFields.OneofFieldsCase.class;
     String name = "DEPRECATED_INT32_IN_ONEOF";
     java.lang.reflect.Field enumValue = oneofCase.getField(name);
-    assertTrue("Enum value " + name + " should be deprecated.",
-       isDeprecated(enumValue));
+    assertTrue("Enum value " + name + " should be deprecated.", isDeprecated(enumValue));
   }
 
   private boolean isDeprecated(AnnotatedElement annotated) {