Make name validity check focus on the random portion#2679
Merged
labkey-tchad merged 2 commits intorelease25.9-SNAPSHOTfrom Sep 11, 2025
Merged
Make name validity check focus on the random portion#2679labkey-tchad merged 2 commits intorelease25.9-SNAPSHOTfrom
labkey-tchad merged 2 commits intorelease25.9-SNAPSHOTfrom
Conversation
Member
Author
labkey-danield
approved these changes
Sep 11, 2025
|
|
||
| public static boolean isNameInvalidLocal(DomainKind domainKind, @Nullable String domainName, @Nullable String fieldName) | ||
| private static final Pattern COLON_NAME_PATTERN = Pattern.compile(":[a-zA-Z]{3}"); // Avoid illegal patterns like ":Date" | ||
| private static boolean isNameInvalidLocal(DomainKind domainKind, @Nullable RandomName domainName, @Nullable RandomName fieldName) |
Contributor
There was a problem hiding this comment.
Nit:
I realize this is not a new method, but in Java, when naming methods that return a boolean value to indicate validity, the convention generally favors positive phrasing. isNameValid vs. isNameInvalid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
The test-side name validation should focus on validating the random portion of generated names. It should assume that the test has provided a valid base name.
Related Pull Requests
Changes
RandomNamerecord for randomly generated names