Skip to content

Commit

Permalink
addressbook.proto: Enable java_multiple_files option
Browse files Browse the repository at this point in the history
And update the java_package value accordingly.
Enabling java_multiple_files is preferred nowadays.
Refs CL 348101638 which updates the tutorial accordingly.
  • Loading branch information
cvrebert authored and acozzette committed Apr 6, 2021
1 parent 053966b commit 9d17549
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions 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;
Expand Down
4 changes: 2 additions & 2 deletions 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;
Expand Down
3 changes: 2 additions & 1 deletion examples/addressbook.proto
Expand Up @@ -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]

Expand Down

0 comments on commit 9d17549

Please sign in to comment.