fix: allow using existing session token(String) in place autocomplete#722
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #722 +/- ##
============================================
- Coverage 69.11% 69.05% -0.07%
Complexity 531 531
============================================
Files 129 129
Lines 2888 2895 +7
Branches 284 283 -1
============================================
+ Hits 1996 1999 +3
- Misses 739 744 +5
+ Partials 153 152 -1
Continue to review full report at Codecov.
|
|
@googlebot I signed it! |
9907e11 to
20b77c8
Compare
| /** | ||
| * Construct a session that is a continuation of a previous session. | ||
| * | ||
| * @param token The unique token to be used as the identifier for this session. |
There was a problem hiding this comment.
I would expect token here to be a string representation of a UUID after reading this comment, but that's not the case given the implementation. While this provides convenience, I think this is potentially error-prone. I suggest either clarifying the comment, or keeping the existing API of constructing a SessionToken from a UUID. The latter seems like a clearer API to me, but if a convenience initializer is useful for others, I'm happy to merge in.
There was a problem hiding this comment.
would
@param token The character string to be used as the unique identifier for this session.
be clear enough?
There was a problem hiding this comment.
keeping the existing API
The existing API does not work well if the session identifier is not a UUID.
Fixes #689