From b395da26b7761d46b25db6e6b15ffbd0a45ac17c Mon Sep 17 00:00:00 2001 From: Emmanuel Cron Date: Tue, 6 Oct 2015 16:57:13 -0700 Subject: [PATCH] Better javadoc --- .../google/gson/protobuf/ProtoTypeAdapter.java | 16 ++++++++-------- proto/src/main/protobuf/annotations.proto | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/proto/src/main/java/com/google/gson/protobuf/ProtoTypeAdapter.java b/proto/src/main/java/com/google/gson/protobuf/ProtoTypeAdapter.java index b5104fb1..e0c425ca 100644 --- a/proto/src/main/java/com/google/gson/protobuf/ProtoTypeAdapter.java +++ b/proto/src/main/java/com/google/gson/protobuf/ProtoTypeAdapter.java @@ -56,7 +56,8 @@ import java.util.Set; * You can specify which case representation is used for the proto fields when writing/reading the * JSON payload by calling {@link Builder#setFieldNameSerializationFormat(CaseFormat, CaseFormat)}. *

- * An example of default serialization/deserialization using custom proto field names is show below: + * An example of default serialization/deserialization using custom proto field names is shown + * below: * *

  * message MyMessage {
@@ -130,16 +131,15 @@ public class ProtoTypeAdapter
 
     /**
      * Adds a field proto annotation that, when set, overrides the default field name
-     * serialization/deserialization. For example, if you add the ' {@code serialized_name}'
+     * serialization/deserialization. For example, if you add the '{@code serialized_name}'
      * annotation and you define a field in your proto like the one below:
      *
      * 
-     * string client_app_id = 1[(serialized_name) = "appId"];
+     * string client_app_id = 1 [(serialized_name) = "appId"];
      * 
* * ...the adapter will serialize the field using '{@code appId}' instead of the default ' - * {@code clientAppId}'. This lets you customize the name serialization of any field of your - * proto. + * {@code clientAppId}'. This lets you customize the name serialization of any proto field. */ public Builder addSerializedNameExtension( Extension serializedNameExtension) { @@ -148,8 +148,8 @@ public class ProtoTypeAdapter } /** - * Adds an enum proto annotation that, when set, overrides the default enum value - * serialization/deerialization of this adapter. For example, if you add the ' + * Adds an enum value proto annotation that, when set, overrides the default enum value + * serialization/deserialization of this adapter. For example, if you add the ' * {@code serialized_value}' annotation and you define an enum in your proto like the one below: * *
@@ -297,7 +297,7 @@ public class ProtoTypeAdapter
         return (GeneratedMessage) protoBuilder.build();
       } catch (SecurityException e) {
         throw new JsonParseException(e);
-      } catch (NoSuchMethodException  e) {
+      } catch (NoSuchMethodException e) {
         throw new JsonParseException(e);
       } catch (IllegalArgumentException e) {
         throw new JsonParseException(e);
diff --git a/proto/src/main/protobuf/annotations.proto b/proto/src/main/protobuf/annotations.proto
index 8246831f..53b727a6 100644
--- a/proto/src/main/protobuf/annotations.proto
+++ b/proto/src/main/protobuf/annotations.proto
@@ -29,4 +29,4 @@ extend google.protobuf.FieldOptions {
 extend google.protobuf.EnumValueOptions {
   // Indicates a field value that overrides the default for serialization
   optional string serialized_value = 92066888;
-}
\ No newline at end of file
+}