From 245224902a80d489389df192c0990ff70f2f3e4c Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 27 Aug 2015 13:59:43 -0700 Subject: Fix javadoc errors. --- .../main/java/com/google/protobuf/ByteString.java | 6 ++--- .../main/java/com/google/protobuf/Internal.java | 29 +++++++++++----------- .../java/com/google/protobuf/RopeByteString.java | 2 +- .../main/java/com/google/protobuf/TextFormat.java | 12 ++++----- 4 files changed, 25 insertions(+), 24 deletions(-) (limited to 'java/src') diff --git a/java/src/main/java/com/google/protobuf/ByteString.java b/java/src/main/java/com/google/protobuf/ByteString.java index 0bd1750d..b092bc36 100644 --- a/java/src/main/java/com/google/protobuf/ByteString.java +++ b/java/src/main/java/com/google/protobuf/ByteString.java @@ -94,7 +94,7 @@ public abstract class ByteString implements Iterable, Serializable { * * @param index index of byte * @return the value - * @throws ArrayIndexOutOfBoundsException {@code index} is < 0 or >= size + * @throws ArrayIndexOutOfBoundsException {@code index < 0 or index >= size} */ public abstract byte byteAt(int index); @@ -679,8 +679,8 @@ public abstract class ByteString implements Iterable, Serializable { * sequences, but (as of 2011) still accepts 3-byte surrogate * character byte sequences. * - *

See the Unicode Standard,
- * Table 3-6. UTF-8 Bit Distribution,
+ *

See the Unicode Standard,
+ * Table 3-6. UTF-8 Bit Distribution,
* Table 3-7. Well Formed UTF-8 Byte Sequences. * * @return whether the bytes in this {@code ByteString} are a diff --git a/java/src/main/java/com/google/protobuf/Internal.java b/java/src/main/java/com/google/protobuf/Internal.java index fefda904..11901998 100644 --- a/java/src/main/java/com/google/protobuf/Internal.java +++ b/java/src/main/java/com/google/protobuf/Internal.java @@ -156,8 +156,8 @@ public class Internal { * but currently (2011) still accepts 3-byte surrogate character * byte sequences. * - *

See the Unicode Standard,
- * Table 3-6. UTF-8 Bit Distribution,
+ *

See the Unicode Standard,
+ * Table 3-6. UTF-8 Bit Distribution,
* Table 3-7. Well Formed UTF-8 Byte Sequences. * *

As of 2011-02, this method simply returns the result of {@link @@ -387,7 +387,7 @@ public class Internal { /** - * Provides an immutable view of List around a List. + * Provides an immutable view of {@code List} around a {@code List}. * * Protobuf internal. Used in protobuf generated code only. */ @@ -419,7 +419,8 @@ public class Internal { } /** - * Wrap around a Map and provide a Map interface. + * Wrap around a {@code Map} and provide a {@code Map} + * interface. */ public static class MapAdapter extends AbstractMap { /** @@ -576,12 +577,12 @@ public class Internal { int getInt(int index); /** - * Like {@link #add(Integer)} but more efficient in that it doesn't box the element. + * Like {@link #add(Object)} but more efficient in that it doesn't box the element. */ void addInt(int element); /** - * Like {@link #set(int, Integer)} but more efficient in that it doesn't box the element. + * Like {@link #set(int, Object)} but more efficient in that it doesn't box the element. */ int setInt(int index, int element); } @@ -598,12 +599,12 @@ public class Internal { boolean getBoolean(int index); /** - * Like {@link #add(Boolean)} but more efficient in that it doesn't box the element. + * Like {@link #add(Object)} but more efficient in that it doesn't box the element. */ void addBoolean(boolean element); /** - * Like {@link #set(int, Boolean)} but more efficient in that it doesn't box the element. + * Like {@link #set(int, Object)} but more efficient in that it doesn't box the element. */ boolean setBoolean(int index, boolean element); } @@ -620,12 +621,12 @@ public class Internal { long getLong(int index); /** - * Like {@link #add(Long)} but more efficient in that it doesn't box the element. + * Like {@link #add(Object)} but more efficient in that it doesn't box the element. */ void addLong(long element); /** - * Like {@link #set(int, Long)} but more efficient in that it doesn't box the element. + * Like {@link #set(int, Object)} but more efficient in that it doesn't box the element. */ long setLong(int index, long element); } @@ -642,12 +643,12 @@ public class Internal { double getDouble(int index); /** - * Like {@link #add(Double)} but more efficient in that it doesn't box the element. + * Like {@link #add(Object)} but more efficient in that it doesn't box the element. */ void addDouble(double element); /** - * Like {@link #set(int, Double)} but more efficient in that it doesn't box the element. + * Like {@link #set(int, Object)} but more efficient in that it doesn't box the element. */ double setDouble(int index, double element); } @@ -664,12 +665,12 @@ public class Internal { float getFloat(int index); /** - * Like {@link #add(Float)} but more efficient in that it doesn't box the element. + * Like {@link #add(Object)} but more efficient in that it doesn't box the element. */ void addFloat(float element); /** - * Like {@link #set(int, Float)} but more efficient in that it doesn't box the element. + * Like {@link #set(int, Object)} but more efficient in that it doesn't box the element. */ float setFloat(int index, float element); } diff --git a/java/src/main/java/com/google/protobuf/RopeByteString.java b/java/src/main/java/com/google/protobuf/RopeByteString.java index 4f3eb127..2c332624 100644 --- a/java/src/main/java/com/google/protobuf/RopeByteString.java +++ b/java/src/main/java/com/google/protobuf/RopeByteString.java @@ -56,7 +56,7 @@ import java.util.Stack; * michael plass * *

The algorithms described in the paper have been implemented for character - * strings in {@link com.google.common.string.Rope} and in the c++ class {@code + * strings in {@code com.google.common.string.Rope} and in the c++ class {@code * cord.cc}. * *

Fundamentally the Rope algorithm represents the collection of pieces as a diff --git a/java/src/main/java/com/google/protobuf/TextFormat.java b/java/src/main/java/com/google/protobuf/TextFormat.java index a79ce559..b4f4ce78 100644 --- a/java/src/main/java/com/google/protobuf/TextFormat.java +++ b/java/src/main/java/com/google/protobuf/TextFormat.java @@ -1175,12 +1175,12 @@ public final class TextFormat { * Determines if repeated values for non-repeated fields and * oneofs are permitted. For example, given required/optional field "foo" * and a oneof containing "baz" and "qux": - *

  • - *
      "foo: 1 foo: 2" - *
        "baz: 1 qux: 2" - *
          merging "foo: 2" into a proto in which foo is already set, or - *
            merging "qux: 2" into a proto in which baz is already set. - * + *
              + *
            • "foo: 1 foo: 2" + *
            • "baz: 1 qux: 2" + *
            • merging "foo: 2" into a proto in which foo is already set, or + *
            • merging "qux: 2" into a proto in which baz is already set. + *
            */ public enum SingularOverwritePolicy { /** The last value is retained. */ -- cgit v1.2.3