Commit cdc0d953 authored by Jisi Liu's avatar Jisi Liu

Merge remote-tracking branch 'origin/3.4.x' into master

parents ee8a0911 cefa9d73
......@@ -333,6 +333,7 @@ java_EXTRA_DIST=
java/core/src/test/java/com/google/protobuf/WellKnownTypesTest.java \
java/core/src/test/java/com/google/protobuf/WireFormatTest.java \
java/core/src/test/proto/com/google/protobuf/any_test.proto \
java/core/src/test/proto/com/google/protobuf/deprecated_file.proto \
java/core/src/test/proto/com/google/protobuf/field_presence_test.proto \
java/core/src/test/proto/com/google/protobuf/lazy_fields_lite.proto \
java/core/src/test/proto/com/google/protobuf/lite_equals_and_hash.proto \
......
......@@ -19,6 +19,7 @@
<arg value="${protobuf.source.dir}/google/protobuf/unittest_enormous_descriptor.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_no_generic_services.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_well_known_types.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/deprecated_file.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/lazy_fields_lite.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/lite_equals_and_hash.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/multiple_files_test.proto"/>
......
......@@ -248,9 +248,12 @@ void FileGenerator::Generate(io::Printer* printer) {
PrintGeneratedAnnotation(
printer, '$', options_.annotate_code ? classname_ + ".java.pb.meta" : "");
printer->Print(
"public final class $classname$ {\n"
"$deprecation$public final class $classname$ {\n"
" private $ctor$() {}\n",
"classname", classname_, "ctor", classname_);
"deprecation", file_->options().deprecated() ?
"@java.lang.Deprecated " : "",
"classname", classname_,
"ctor", classname_);
printer->Annotate("classname", file_->name());
printer->Indent();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment