Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/org/labkey/test/util/TestDataGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ private static boolean isNameInvalidRemote(DomainKind domainKind, @Nullable Rand
}

private static final Pattern COLON_NAME_PATTERN = Pattern.compile(":[a-zA-Z]{3}"); // Avoid illegal patterns like ":Date"
private static final Set<String> ILLEGAL_PROPERTY_NAMES = Set.of("*"); // Issue 53416
private static boolean isNameInvalidLocal(DomainKind domainKind, @Nullable RandomName domainName, @Nullable RandomName fieldName)
{
if (domainName != null)
Expand Down Expand Up @@ -724,9 +725,11 @@ private static boolean isNameInvalidLocal(DomainKind domainKind, @Nullable Rando
return true;
if (fieldName.name().length() > 200)
return true;
if (ILLEGAL_PROPERTY_NAMES.contains(fieldName.name()))
return true;
if (COLON_NAME_PATTERN.matcher(fieldName.name())
.results().map(mr -> mr.group(0))
.anyMatch(s -> !fieldName.part().contains(s))) // Only check random portion of the name
.anyMatch(s -> !fieldName.part().contains(s))) // Only check the random portions of the name
return true;
}

Expand Down