aboutsummaryrefslogtreecommitdiffhomepage
path: root/java
diff options
context:
space:
mode:
authorGravatar goorov <goorov@gmail.com>2017-01-12 09:35:19 +0300
committerGravatar GitHub <noreply@github.com>2017-01-12 09:35:19 +0300
commitfac90c66c37d8659c644019ffb4a2540b8050ae8 (patch)
treed8ab8c8513f57b1654b52f8269fcc8c746c49dfb /java
parent228d242c583fb4e0dde17f0a52899f995d85c200 (diff)
Update AbstractMessage.java
Method Builder#clone() has been changed to bypass Java 1.6 compiler issue.
Diffstat (limited to 'java')
-rw-r--r--java/core/src/main/java/com/google/protobuf/AbstractMessage.java5
1 files changed, 4 insertions, 1 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 7639efcf..7935d6fe 100644
--- a/java/core/src/main/java/com/google/protobuf/AbstractMessage.java
+++ b/java/core/src/main/java/com/google/protobuf/AbstractMessage.java
@@ -328,8 +328,11 @@ public abstract class AbstractMessage
extends AbstractMessageLite.Builder
implements Message.Builder {
// The compiler produces an error if this is not declared explicitly.
+ /** Method isn't abstact to bypass Java 1.6 compiler issue. */
@Override
- public abstract BuilderType clone();
+ public BuilderType clone() {
+ throw new UnsupportedOperationException("clone() should be implemented in subclasses.");
+ }
/** TODO(jieluo): Clear it when all subclasses have implemented this method. */
@Override