Skip to content

Commit

Permalink
Fixes checkstyle errors
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Jul 10, 2023
1 parent a31e1ec commit a076730
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
public abstract class BaseExtensionRestHandler implements ExtensionRestHandler {

private static final String VALID_EXTENSION_NAME_PATTERN = "^[a-zA-Z0-9:/*_]*$";

private static String extensionName;

/**
Expand Down Expand Up @@ -79,6 +80,10 @@ protected List<ReplacedRouteHandler> replacedRouteHandlers() {
return Collections.emptyList();
}

/**
* Sets the extension name that can be used for logging and optionally used in routePrefix
* @param extensionName the name of this extension
*/
public void setExtensionName(String extensionName) {
if (extensionName == null || extensionName.isBlank() || !extensionName.matches(VALID_EXTENSION_NAME_PATTERN)) {
throw new OpenSearchException(
Expand Down

0 comments on commit a076730

Please sign in to comment.