Skip to content

Commit

Permalink
Fix long rendering in TimestampValidation in Java generator (#782)
Browse files Browse the repository at this point in the history
Resolve #781

Co-authored-by: Elliot Jackson <13633636+elliotmjackson@users.noreply.github.com>
  • Loading branch information
lujiajing1126 and elliotmjackson committed Mar 20, 2023
1 parent a25422d commit d153612
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/java/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,13 @@ func (fns javaFuncs) byteArrayLit(bytes []uint8) string {

func (fns javaFuncs) durLit(dur *durationpb.Duration) string {
return fmt.Sprintf(
"io.envoyproxy.pgv.TimestampValidation.toDuration(%d,%d)",
"io.envoyproxy.pgv.TimestampValidation.toDuration(%dL,%d)",
dur.GetSeconds(), dur.GetNanos())
}

func (fns javaFuncs) tsLit(ts *timestamppb.Timestamp) string {
return fmt.Sprintf(
"io.envoyproxy.pgv.TimestampValidation.toTimestamp(%d,%d)",
"io.envoyproxy.pgv.TimestampValidation.toTimestamp(%dL,%d)",
ts.GetSeconds(), ts.GetNanos())
}

Expand Down

0 comments on commit d153612

Please sign in to comment.