Description: Remove dependency on errror-prone library
 Library is not necessary and is not currently available in Debian. This patch
 can be safely removed if the error-prone library is ever added to Debian and
 that functionality is needed in protobuf.
Author: Olek Wojnar <olek@debian.org>
Last-Update: 2020-05-01

--- a/java/util/src/main/java/com/google/protobuf/util/Durations.java
+++ b/java/util/src/main/java/com/google/protobuf/util/Durations.java
@@ -42,7 +42,7 @@
 import static com.google.protobuf.util.Timestamps.NANOS_PER_MILLISECOND;
 import static com.google.protobuf.util.Timestamps.NANOS_PER_SECOND;
 
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
+//import com.google.errorprone.annotations.CanIgnoreReturnValue;
 import com.google.protobuf.Duration;
 import java.text.ParseException;
 import java.util.Comparator;
@@ -152,7 +152,7 @@
    * @throws IllegalArgumentException if {@code duration} is negative or invalid
    * @throws NullPointerException if {@code duration} is {@code null}
    */
-  @CanIgnoreReturnValue
+//  @CanIgnoreReturnValue
   public static Duration checkNotNegative(Duration duration) {
     checkValid(duration);
     checkArgument(!isNegative(duration), "duration (%s) must not be negative", toString(duration));
@@ -165,7 +165,7 @@
    * @throws IllegalArgumentException if {@code duration} is negative, {@code ZERO}, or invalid
    * @throws NullPointerException if {@code duration} is {@code null}
    */
-  @CanIgnoreReturnValue
+//  @CanIgnoreReturnValue
   public static Duration checkPositive(Duration duration) {
     checkValid(duration);
     checkArgument(
@@ -176,7 +176,7 @@
   }
 
   /** Throws an {@link IllegalArgumentException} if the given {@link Duration} is not valid. */
-  @CanIgnoreReturnValue
+//  @CanIgnoreReturnValue
   public static Duration checkValid(Duration duration) {
     long seconds = duration.getSeconds();
     int nanos = duration.getNanos();
--- a/java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java
+++ b/java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java
@@ -30,7 +30,7 @@
 
 package com.google.protobuf.util;
 
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
+//import com.google.errorprone.annotations.CanIgnoreReturnValue;
 import com.google.protobuf.Descriptors.Descriptor;
 import com.google.protobuf.Descriptors.FieldDescriptor;
 import com.google.protobuf.FieldMask;
@@ -96,7 +96,7 @@
    * exists, which will turn the tree node for "foo.bar" to a leaf node. Likewise, if the field path
    * to add is a sub-path of an existing leaf node, nothing will be changed in the tree.
    */
-  @CanIgnoreReturnValue
+//  @CanIgnoreReturnValue
   FieldMaskTree addFieldPath(String path) {
     String[] parts = path.split(FIELD_PATH_SEPARATOR_REGEX);
     if (parts.length == 0) {
@@ -126,7 +126,7 @@
   }
 
   /** Merges all field paths in a FieldMask into this tree. */
-  @CanIgnoreReturnValue
+//  @CanIgnoreReturnValue
   FieldMaskTree mergeFromFieldMask(FieldMask mask) {
     for (String path : mask.getPathsList()) {
       addFieldPath(path);
--- a/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java
+++ b/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java
@@ -37,7 +37,7 @@ import com.google.common.base.Joiner;
 import com.google.common.base.Optional;
 import com.google.common.base.Splitter;
 import com.google.common.primitives.Ints;
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
+//import com.google.errorprone.annotations.CanIgnoreReturnValue;
 import com.google.protobuf.Descriptors.Descriptor;
 import com.google.protobuf.Descriptors.FieldDescriptor;
 import com.google.protobuf.FieldMask;
@@ -330,7 +330,7 @@
      *
      * <p>If false, merge the source message field into the destination message field.
      */
-    @CanIgnoreReturnValue
+//    @CanIgnoreReturnValue
     public MergeOptions setReplaceMessageFields(boolean value) {
       replaceMessageFields = value;
       return this;
@@ -343,7 +343,7 @@
      *
      * <p>If false, append elements from source repeated field to the destination repeated field.
      */
-    @CanIgnoreReturnValue
+//    @CanIgnoreReturnValue
     public MergeOptions setReplaceRepeatedFields(boolean value) {
       replaceRepeatedFields = value;
       return this;
@@ -360,7 +360,7 @@
      * field, and if the source field is unset, the default value of the source field is copied to
      * the destination.
      */
-    @CanIgnoreReturnValue
+//    @CanIgnoreReturnValue
     public MergeOptions setReplacePrimitiveFields(boolean value) {
       replacePrimitiveFields = value;
       return this;
--- a/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java
+++ b/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java
@@ -32,7 +32,7 @@
 
 import com.google.common.base.Preconditions;
 import com.google.common.io.BaseEncoding;
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
+//import com.google.errorprone.annotations.CanIgnoreReturnValue;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonArray;
@@ -546,7 +546,7 @@
        * Adds a message type and all types defined in the same .proto file as well as all
        * transitively imported .proto files to this {@link Builder}.
        */
-      @CanIgnoreReturnValue
+//      @CanIgnoreReturnValue
       public Builder add(Descriptor messageType) {
         if (types == null) {
           throw new IllegalStateException("A TypeRegistry.Builder can only be used once.");
@@ -559,7 +559,7 @@
        * Adds message types and all types defined in the same .proto file as well as all
        * transitively imported .proto files to this {@link Builder}.
        */
-      @CanIgnoreReturnValue
+//      @CanIgnoreReturnValue
       public Builder add(Iterable<Descriptor> messageTypes) {
         if (types == null) {
           throw new IllegalStateException("A TypeRegistry.Builder can only be used once.");
--- a/java/util/src/main/java/com/google/protobuf/util/Timestamps.java
+++ b/java/util/src/main/java/com/google/protobuf/util/Timestamps.java
@@ -36,7 +36,7 @@
 import static com.google.common.math.LongMath.checkedMultiply;
 import static com.google.common.math.LongMath.checkedSubtract;
 
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
+//import com.google.errorprone.annotations.CanIgnoreReturnValue;
 import com.google.protobuf.Duration;
 import com.google.protobuf.Timestamp;
 import java.text.ParseException;
@@ -164,7 +164,7 @@
   }
 
   /** Throws an {@link IllegalArgumentException} if the given {@link Timestamp} is not valid. */
-  @CanIgnoreReturnValue
+//  @CanIgnoreReturnValue
   public static Timestamp checkValid(Timestamp timestamp) {
     long seconds = timestamp.getSeconds();
     int nanos = timestamp.getNanos();
