Skip to content

Commit

Permalink
1050: * Changed the indentation from spaces to tab.
Browse files Browse the repository at this point in the history
* Included private no-args constructors.
* refactoring.

Signed-off-by: Vikas Adyar <[email protected]>
  • Loading branch information
vAdyar committed Feb 8, 2025
1 parent bac084d commit 3ee4f13
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
10 changes: 4 additions & 6 deletions formatter/formatting.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ allprojects {
target '**/*.java'

removeUnusedImports()
importOrder(
'de.thetaphi',
importOrder('de.thetaphi',
'com.carrotsearch',
'com.fasterxml',
'com.avast',
Expand All @@ -19,11 +18,10 @@ allprojects {
'javax',
'java',
'',
'\\#java|\\#org.opensearch|\\#org.hamcrest|\\#'
)
'\\#java|\\#org.opensearch|\\#org.hamcrest|\\#')
eclipse().configFile rootProject.file('formatter/formatterConfig.xml')
trimTrailingWhitespace()
endWithNewline();
endWithNewline()

// See DEVELOPER_GUIDE.md for details of when to enable this.
if (System.getProperty('spotless.paddedcell') != null) {
Expand All @@ -38,7 +36,7 @@ allprojects {
indentWithSpaces()
}
format("license", {
licenseHeaderFile("${rootProject.file("formatter/license-header.txt")}", "package ");
licenseHeaderFile("${rootProject.file("formatter/license-header.txt")}", "package ")
target("src/*/java/**/*.java")
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class ApiSpecFetcher {
PARSE_OPTIONS.setResolveFully(true);
}

private ApiSpecFetcher() {}

/**
* Parses the OpenAPI specification directly from the URI.
*
Expand Down Expand Up @@ -87,23 +89,13 @@ public static boolean compareRequiredFields(List<String> requiredEnumParams, Str
}

private static Content getContent(RestRequest.Method method, PathItem pathItem) throws IllegalArgumentException, ApiSpecParseException {
Operation operation;
switch (method) {
case POST:
operation = pathItem.getPost();
break;
case GET:
operation = pathItem.getGet();
break;
case PUT:
operation = pathItem.getPut();
break;
case DELETE:
operation = pathItem.getDelete();
break;
default:
throw new IllegalArgumentException("Unsupported HTTP method: " + method);
}
Operation operation = switch (method) {
case POST -> pathItem.getPost();
case GET -> pathItem.getGet();
case PUT -> pathItem.getPut();
case DELETE -> pathItem.getDelete();
default -> throw new IllegalArgumentException("Unsupported HTTP method: " + method);
};

if (operation == null) {
throw new IllegalArgumentException("No operation found for the specified method: " + method);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class EncryptorUtils {
private static final String WRAPPING_ALGORITHM = "AES/GCM/NOPADDING";

// concurrent map can't have null as a key. This key is to support single tenancy
public static final String DEFAULT_TENANT_ID = "";
private static final String DEFAULT_TENANT_ID = "";

private final ClusterService clusterService;
private final Client client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
public class TenantAwareHelper {

private TenantAwareHelper() {}

/**
* Validates the tenant ID based on the multi-tenancy feature setting.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public class WorkflowTimeoutUtility {

private static final Logger logger = LogManager.getLogger(WorkflowTimeoutUtility.class);

private WorkflowTimeoutUtility() {}

/**
* Schedules a timeout task for a workflow execution.
*
Expand Down

0 comments on commit 3ee4f13

Please sign in to comment.