Commits

Anonymous committed 9afe4f3

Remove @Override annotations that cause compiler errors on Java 1.5.

Comments (0)

Files changed (2)

java/src/main/java/com/google/protobuf/Descriptors.java

      * For internal use only.  This is to satisfy the FieldDescriptorLite
      * interface.
      */
-    @Override
     public MessageLite.Builder internalMergeFrom(
         MessageLite.Builder to, MessageLite from) {
       // FieldDescriptors are only used with non-lite messages so we can just

src/google/protobuf/compiler/java/java_message.cc

       "  return $fileclass$.internal_$identifier$_descriptor;\n"
       "}\n"
       "\n"
-      "@Override\n"
       "protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n"
       "    internalGetFieldAccessorTable() {\n"
       "  return $fileclass$.internal_$identifier$_fieldAccessorTable;\n"
        ExtensionRangeOrdering());
 
   printer->Print(
-    "@Override\n"
     "public void writeTo(com.google.protobuf.CodedOutputStream output)\n"
     "                    throws java.io.IOException {\n");
   printer->Indent();
     "}\n"
     "\n"
     "private int memoizedSerializedSize = -1;\n"
-    "@Override\n"
     "public int getSerializedSize() {\n"
     "  int size = memoizedSerializedSize;\n"
     "  if (size != -1) return size;\n"
     "  return builder;\n"
     "}\n"
     "\n"
-    "@Override\n"
     "protected $classname$ internalGetResult() {\n"
     "  return result;\n"
     "}\n"
     "\n"
-    "@Override\n"
     "public Builder clear() {\n"
     "  if (result == null) {\n"
     "    throw new IllegalStateException(\n"
     "  return this;\n"
     "}\n"
     "\n"
-    "@Override\n"
     "public Builder clone() {\n"
     "  return create().mergeFrom(result);\n"
     "}\n"
     "classname", ClassName(descriptor_));
   if (HasDescriptorMethods(descriptor_)) {
     printer->Print(
-      "@Override\n"
       "public com.google.protobuf.Descriptors.Descriptor\n"
       "    getDescriptorForType() {\n"
       "  return $classname$.getDescriptor();\n"
     // messages type by its descriptor.
     if (HasDescriptorMethods(descriptor_)) {
       printer->Print(
-        "@Override\n"
         "public Builder mergeFrom(com.google.protobuf.Message other) {\n"
         "  if (other instanceof $classname$) {\n"
         "    return mergeFrom(($classname$)other);\n"
     SortFieldsByNumber(descriptor_));
 
   printer->Print(
-    "@Override\n"
     "public Builder mergeFrom(\n"
     "    com.google.protobuf.CodedInputStream input,\n"
     "    com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n"
 
 void MessageGenerator::GenerateIsInitialized(io::Printer* printer) {
   printer->Print(
-    "@Override\n"
     "public final boolean isInitialized() {\n");
   printer->Indent();