Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* Fix #6886: Remove invalid JUnit 4 references

#### Improvements

* Fix #6313: Add HasMetadata.getDefaultPluralFor method
* Fix #6863: ensuring SerialExecutor does not throw RejectedExecutionException to prevent unnecessary error logs
* Fix #6763: (crd-generator) YAML output customization
* Fix #6880: LogWatch interface provides listeners on close stream event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ static String getPlural(Class<?> clazz) {
: Pluralize.toPlural(getSingular(clazz)));
}

/**
* Retrieves the default plural form associated with the specified kind. Note that this is a best-effort attempt based on only
* the provided kind and might not correspond to the actual plural form if defined in a different way than the linguistic
* plural derived from the kind.
*
* @param kind the kind which default plural form we want to retrieve
* @return the default plural form associated with the specified kind
*/
static String getDefaultPluralFor(String kind) {
return kind != null ? Pluralize.toPlural(kind.toLowerCase(Locale.ROOT)) : null;
}

/**
* Retrieves the singular form associated with the specified class as defined by the
* {@link Singular} annotation or computes a default value (lower-cased version of the value
Expand Down
Loading