Merge pull request #2602 from GreatFruitOmsk/issue-2428

Method Builder#clone() has been changed to bypass Java 1.6 compiler issue.
pull/2809/head
Feng Xiao 8 years ago committed by GitHub
commit fa1788026c
  1. 5
      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 abstract to bypass Java 1.6 compiler issue http://bugs.java.com/view_bug.do?bug_id=6908259
@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

Loading…
Cancel
Save