You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/11/02 12:24:55 UTC

[GitHub] [flink] zentol commented on a diff in pull request #21221: [FLINK-29846] Upgrade ArchUnit to 1.0.0

zentol commented on code in PR #21221:
URL: https://github.com/apache/flink/pull/21221#discussion_r1011673954


##########
flink-architecture-tests/flink-architecture-tests-test/src/main/java/org/apache/flink/architecture/rules/ITCaseRules.java:
##########
@@ -57,6 +57,7 @@ public class ITCaseRules {
                                     .doNotHaveModifier(ABSTRACT)
                                     .should()
                                     .haveSimpleNameEndingWith("ITCase"))
+                    .allowEmptyShould(true)

Review Comment:
   add a comment why we allow this.



##########
flink-architecture-tests/flink-architecture-tests-base/src/main/java/org/apache/flink/architecture/common/Predicates.java:
##########
@@ -61,7 +62,7 @@ public static DescribedPredicate<JavaClass> containAnyFieldsInClassHierarchyThat
             DescribedPredicate<? super JavaField> predicate) {
         return new ContainAnyFieldsThatPredicate<>(
                 "fields",
-                new ChainableFunction<JavaClass, Set<JavaField>>() {
+                new Function<JavaClass, Set<JavaField>>() {

Review Comment:
   can this be a lambda function?



##########
flink-architecture-tests/flink-architecture-tests-base/src/main/java/org/apache/flink/architecture/common/Predicates.java:
##########
@@ -48,7 +47,9 @@ public static DescribedPredicate<JavaClass> areDirectlyAnnotatedWithAtLeastOneOf
             Class<? extends Annotation>... annotations) {
         return Arrays.stream(annotations)
                 .map(CanBeAnnotated.Predicates::annotatedWith)
-                .reduce(DescribedPredicate::or)
+                .reduce(
+                        (canBeAnnotatedDescribedPredicate, other) ->
+                                canBeAnnotatedDescribedPredicate.or(other))

Review Comment:
   Did the added static `or` method ruin this? :weary:  



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org