From 9d175493a341885019d8fad6571ddc0cf69473a2 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 31 Mar 2021 17:13:01 -0700 Subject: [PATCH] addressbook.proto: Enable java_multiple_files option And update the java_package value accordingly. Enabling java_multiple_files is preferred nowadays. Refs CL 348101638 which updates the tutorial accordingly. --- examples/AddPerson.java | 4 ++-- examples/ListPeople.java | 4 ++-- examples/addressbook.proto | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/AddPerson.java b/examples/AddPerson.java index c262ab7e6064..2f6a2313f299 100644 --- a/examples/AddPerson.java +++ b/examples/AddPerson.java @@ -1,7 +1,7 @@ // See README.txt for information and build instructions. -import com.example.tutorial.AddressBookProtos.AddressBook; -import com.example.tutorial.AddressBookProtos.Person; +import com.example.tutorial.protos.AddressBook; +import com.example.tutorial.protos.Person; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; diff --git a/examples/ListPeople.java b/examples/ListPeople.java index 580f7ac2af4a..ab07b7914d61 100644 --- a/examples/ListPeople.java +++ b/examples/ListPeople.java @@ -1,7 +1,7 @@ // See README.txt for information and build instructions. -import com.example.tutorial.AddressBookProtos.AddressBook; -import com.example.tutorial.AddressBookProtos.Person; +import com.example.tutorial.protos.AddressBook; +import com.example.tutorial.protos.Person; import java.io.FileInputStream; import java.io.IOException; import java.io.PrintStream; diff --git a/examples/addressbook.proto b/examples/addressbook.proto index b4b33b4c6589..c77b57d38412 100644 --- a/examples/addressbook.proto +++ b/examples/addressbook.proto @@ -14,7 +14,8 @@ import "google/protobuf/timestamp.proto"; // [END declaration] // [START java_declaration] -option java_package = "com.example.tutorial"; +option java_multiple_files = true; +option java_package = "com.example.tutorial.protos"; option java_outer_classname = "AddressBookProtos"; // [END java_declaration]