phet commented on a change in pull request #3416:
URL: https://github.com/apache/gobblin/pull/3416#discussion_r732157356
##########
File path:
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigV2ResourceLocalHandler.java
##########
@@ -103,18 +101,13 @@ private String getErrorMessage(FlowSpec flowSpec) {
StringBuilder message = new StringBuilder("Flow was not compiled
successfully.");
if (!flowSpec.getCompilationErrors().isEmpty()) {
message.append(" Compilation errors encountered (Sorted by relevance):
");
- Object[] errors = flowSpec.getCompilationErrors().toArray();
+ Object[] errors =
flowSpec.getCompilationErrors().stream().distinct().toArray(FlowSpec.CompilationError[]::new);
Review comment:
don't you get a `FS.CE[]`, rather than `Object[]`, and can avoid the
cast later?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]