From fa527024088bd3d8f3deb04aef47b4d0e2c84793 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 18 Jul 2016 15:56:33 -0700 Subject: [PATCH] Include javadoc/source in Java release packages. Also fixed javadoc errors. [ci skip] --- .../com/google/protobuf/AbstractMessage.java | 2 +- .../java/com/google/protobuf/ByteOutput.java | 4 +-- .../java/com/google/protobuf/Internal.java | 20 +++++++------- .../main/java/com/google/protobuf/Parser.java | 2 +- .../protobuf/TextFormatParseInfoTree.java | 4 +-- java/pom.xml | 26 +++++++++++++++++++ 6 files changed, 42 insertions(+), 16 deletions(-) diff --git a/java/core/src/main/java/com/google/protobuf/AbstractMessage.java b/java/core/src/main/java/com/google/protobuf/AbstractMessage.java index 46ddbf48da..7639efcfca 100644 --- a/java/core/src/main/java/com/google/protobuf/AbstractMessage.java +++ b/java/core/src/main/java/com/google/protobuf/AbstractMessage.java @@ -490,7 +490,7 @@ public abstract class AbstractMessage /** * Used to support nested builders and called to mark this builder as clean. - * Clean builders will propagate the {@link BuildParent#markDirty()} event + * Clean builders will propagate the {@link BuilderParent#markDirty()} event * to their parent builders, while dirty builders will not, as their parents * should be dirty already. * diff --git a/java/core/src/main/java/com/google/protobuf/ByteOutput.java b/java/core/src/main/java/com/google/protobuf/ByteOutput.java index 8b7b04c8c2..ee5887538f 100644 --- a/java/core/src/main/java/com/google/protobuf/ByteOutput.java +++ b/java/core/src/main/java/com/google/protobuf/ByteOutput.java @@ -37,11 +37,11 @@ import java.nio.ByteBuffer; * An output target for raw bytes. This interface provides semantics that support two types of * writing: * - *

Traditional write operations: + *

Traditional write operations: * (as defined by {@link java.io.OutputStream}) where the target method is responsible for either * copying the data or completing the write before returning from the method call. * - *

Lazy write operations: where the caller guarantees that it will never modify the + *

Lazy write operations: where the caller guarantees that it will never modify the * provided buffer and it can therefore be considered immutable. The target method is free to * maintain a reference to the buffer beyond the scope of the method call (e.g. until the write * operation completes). diff --git a/java/core/src/main/java/com/google/protobuf/Internal.java b/java/core/src/main/java/com/google/protobuf/Internal.java index d1de375e14..3b4a041250 100644 --- a/java/core/src/main/java/com/google/protobuf/Internal.java +++ b/java/core/src/main/java/com/google/protobuf/Internal.java @@ -611,12 +611,12 @@ public final 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); @@ -639,12 +639,12 @@ public final 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); @@ -667,12 +667,12 @@ public final 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); @@ -695,12 +695,12 @@ public final 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); @@ -723,12 +723,12 @@ public final 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/core/src/main/java/com/google/protobuf/Parser.java b/java/core/src/main/java/com/google/protobuf/Parser.java index 6db6924727..cfbcb44257 100644 --- a/java/core/src/main/java/com/google/protobuf/Parser.java +++ b/java/core/src/main/java/com/google/protobuf/Parser.java @@ -39,7 +39,7 @@ import java.io.InputStream; * *

All methods may throw {@link InvalidProtocolBufferException}. In the event of invalid data, * like an encoding error, the cause of the thrown exception will be {@code null}. However, if an - * I/O problem occurs, an exception is thrown with an {@link IOException} cause. + * I/O problem occurs, an exception is thrown with an {@link java.io.IOException} cause. * * @author liujisi@google.com (Pherl Liu) */ diff --git a/java/core/src/main/java/com/google/protobuf/TextFormatParseInfoTree.java b/java/core/src/main/java/com/google/protobuf/TextFormatParseInfoTree.java index 2ecf912e67..5c43b2c3a6 100644 --- a/java/core/src/main/java/com/google/protobuf/TextFormatParseInfoTree.java +++ b/java/core/src/main/java/com/google/protobuf/TextFormatParseInfoTree.java @@ -45,7 +45,7 @@ import java.util.Map.Entry; * *

The locations of primary fields values are retrieved by {@code getLocation} or * {@code getLocations}. The locations of sub message values are within nested - * {@code TextFormatParseInfoTree}s and are retrieve by {@getNestedTree} or {code @getNestedTrees}. + * {@code TextFormatParseInfoTree}s and are retrieve by {@code getNestedTree} or {@code getNestedTrees}. * *

The {@code TextFormatParseInfoTree} is created by a Builder. */ @@ -197,7 +197,7 @@ public class TextFormatParseInfoTree { * Set for a sub message. * *

A new builder is created for a sub message. The builder that is returned is a new builder. - * The return is not the invoked {@code builder.getBuilderForSubMessageField}. + * The return is not the invoked {@code builder.getBuilderForSubMessageField}. * * @param fieldDescriptor the field whose value is the submessage * @return a new Builder for the sub message diff --git a/java/pom.xml b/java/pom.xml index 2d7161b21b..2d8e9a1305 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -151,6 +151,32 @@ release + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + maven-gpg-plugin 1.6