Skip to content

Commit

Permalink
checkstyle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit-CloudSufi committed Jan 23, 2025
1 parent cf2dc1f commit 875e48f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private Map<String, String> getFSProperties() {
e.getMessage());
throw ErrorUtils.getProgramFailureException(
new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN), errorMessage, errorMessage,
ErrorType.USER, true, null);
ErrorType.SYSTEM, false, null);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,8 @@ private void validateOutputFormatProvider(FormatContext context, String format,
@Nullable ValidatingOutputFormat validatingOutputFormat) {
FailureCollector collector = context.getFailureCollector();
if (validatingOutputFormat == null) {
collector.addFailure(
String.format("Could not load the output format %s.", format), null)
.withPluginNotFound(format, format, ValidatingOutputFormat.PLUGIN_TYPE);
collector.addFailure(String.format("Could not load the output format %s.", format), null)
.withPluginNotFound(format, format, ValidatingOutputFormat.PLUGIN_TYPE);
} else {
validatingOutputFormat.validate(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public void validate(FailureCollector collector, Map<String, String> arguments)
} catch (IllegalArgumentException e) {
collector.addFailure(
String.format("Invalid suffix, %s: %s", e.getClass().getName(), e.getMessage()),
"Ensure provided suffix is valid.")
.withConfigProperty(NAME_SUFFIX).withStacktrace(e.getStackTrace());
"Ensure provided suffix is valid.").withConfigProperty(NAME_SUFFIX)
.withStacktrace(e.getStackTrace());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ protected ValidatingInputFormat getInputFormatForRun(BatchSourceContext context,
return context.newPluginInstance(fileFormat);
} catch (InvalidPluginConfigException e) {
Set<String> properties = new HashSet<>(e.getMissingProperties());
for (InvalidPluginProperty invalidProperty: e.getInvalidProperties()) {
for (InvalidPluginProperty invalidProperty : e.getInvalidProperties()) {
properties.add(invalidProperty.getName());
}
String errorMessage = String.format("Format '%s' cannot be used because properties %s "
Expand All @@ -294,9 +294,8 @@ protected ValidatingInputFormat getInputFormatForRun(BatchSourceContext context,
new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN), errorMessage, errorMessage,
ErrorType.USER, false, null);
} catch (InstantiationException e) {
collector.addFailure(
String.format("Could not load the input format %s. %s: %s", fileFormat,
e.getClass().getName(), e.getMessage()), null)
collector.addFailure(String.format("Could not load the input format %s. %s: %s", fileFormat,
e.getClass().getName(), e.getMessage()), null)
.withPluginNotFound(fileFormat, fileFormat, ValidatingInputFormat.PLUGIN_TYPE)
.withStacktrace(e.getStackTrace());
throw collector.getOrThrowException();
Expand Down

0 comments on commit 875e48f

Please sign in to comment.