Update AbstractMessage.java

Method Builder#clone() has been changed to bypass Java 1.6 compiler issue.
This commit is contained in:
goorov 2017-01-12 09:35:19 +03:00 committed by GitHub
parent 228d242c58
commit fac90c66c3

View file

@ -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