pnowojski commented on code in PR #24868: URL: https://github.com/apache/flink/pull/24868#discussion_r1618893857
########## flink-core/src/main/java/org/apache/flink/api/dag/Transformation.java: ########## @@ -638,29 +637,15 @@ public boolean equals(Object o) { } Transformation<?> that = (Transformation<?>) o; - - if (bufferTimeout != that.bufferTimeout) { - return false; - } - if (id != that.id) { - return false; - } - if (parallelism != that.parallelism) { - return false; - } - if (!name.equals(that.name)) { - return false; - } - return outputType != null ? outputType.equals(that.outputType) : that.outputType == null; + return Objects.equals(bufferTimeout, that.bufferTimeout) + && Objects.equals(id, that.id) + && Objects.equals(parallelism, that.parallelism) + && Objects.equals(name, that.name) + && Objects.equals(outputType, that.outputType); } @Override public int hashCode() { - int result = id; - result = 31 * result + name.hashCode(); - result = 31 * result + (outputType != null ? outputType.hashCode() : 0); - result = 31 * result + parallelism; - result = 31 * result + (int) (bufferTimeout ^ (bufferTimeout >>> 32)); - return result; + return Objects.hash(id, name, outputType, parallelism, bufferTimeout); Review Comment: Thanks for pointing this out but I don't see how this should matter in our case. I have never seen any `Objects.hash` call anywhere being issue in Flink. Also `Transformation` is not used on any critical path, but during job submission, where there are tons of much heavier operations happening. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org