Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RID parsing's LastIndexOf call to use invariant culture #35637

Merged

Conversation

JL03-Yue
Copy link
Member

Per #34347, update RID parsing's LastIndexOf call to use invariant culture

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Sep 21, 2023
@KalleOlaviNiemitalo
Copy link
Contributor

LastIndexOf('-') with a char literal would be a bit more correct, by ensuring that the length of the matched substring is exactly one char.

@JL03-Yue JL03-Yue force-pushed the rid-parsing-not-consider-culture branch from e257e78 to 85e28f7 Compare September 22, 2023 21:27
@JL03-Yue JL03-Yue requested a review from dsplaisted September 25, 2023 17:09
Copy link
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can you retarget this to release/8.0.2xx (and make sure to get rid of any additional changes that brings in)? Then we should talk about what other branches we want to backport this to.

@JL03-Yue JL03-Yue changed the base branch from main to release/8.0.2xx September 25, 2023 23:02
@JL03-Yue JL03-Yue removed request for a team September 25, 2023 23:04
@JL03-Yue JL03-Yue force-pushed the rid-parsing-not-consider-culture branch from 5645069 to 8c76bcb Compare September 25, 2023 23:07
Copy link
Member

@MiYanni MiYanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question: Is there a reason to use static methods for parsing the RID instead of just having a RID class that does a Split once and saves the parts as properties? My thought is that having static methods encourages reparsing (which we wouldn't want) whereas a RID class encourages passing around an instance of itself for use where the info is needed.
CC @dsplaisted

@JL03-Yue JL03-Yue merged commit cdaefdc into dotnet:release/8.0.2xx Sep 26, 2023
16 checks passed
@JL03-Yue JL03-Yue deleted the rid-parsing-not-consider-culture branch October 5, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants