Skip to content

Commit

Permalink
add newBuilder() to logging.SourceLocation (#3339)
Browse files Browse the repository at this point in the history
* add newBuilder() to logging.SourceLocation

* fix code review
  • Loading branch information
yihanzhen authored Jun 4, 2018
1 parent 6606074 commit f4adabf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public final class SourceLocation implements Serializable {
private final Long line;
private final String function;

public static Builder newBuilder() {
return new Builder();
}

/**
* A builder for {@code SourceLocation} objects.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SourceLocationTest {
private static final String FILE = "file";
private static final Long LINE = 42L;
private static final String FUNCTION = "function";
private static final SourceLocation SOURCE_LOCATION = new SourceLocation.Builder()
private static final SourceLocation SOURCE_LOCATION = SourceLocation.newBuilder()
.setFile(FILE)
.setLine(LINE)
.setFunction(FUNCTION)
Expand Down

0 comments on commit f4adabf

Please sign in to comment.