From fac90c66c37d8659c644019ffb4a2540b8050ae8 Mon Sep 17 00:00:00 2001 From: goorov Date: Thu, 12 Jan 2017 09:35:19 +0300 Subject: Update AbstractMessage.java Method Builder#clone() has been changed to bypass Java 1.6 compiler issue. --- java/core/src/main/java/com/google/protobuf/AbstractMessage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'java/core') 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 -- cgit v1.2.3 From 24908e1b32ecf08ed8469ce83d0118fb3f3b403e Mon Sep 17 00:00:00 2001 From: goorov Date: Fri, 13 Jan 2017 10:33:42 +0300 Subject: Update AbstractMessage.java Apply review's comments. --- java/core/src/main/java/com/google/protobuf/AbstractMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/core') 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 7935d6fe..37180da8 100644 --- a/java/core/src/main/java/com/google/protobuf/AbstractMessage.java +++ b/java/core/src/main/java/com/google/protobuf/AbstractMessage.java @@ -328,7 +328,7 @@ 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. */ + // Method isn't abstract to bypass Java 1.6 compiler issue http://bugs.java.com/view_bug.do?bug_id=6908259 @Override public BuilderType clone() { throw new UnsupportedOperationException("clone() should be implemented in subclasses."); -- cgit v1.2.3