MartijnVisser commented on code in PR #19377: URL: https://github.com/apache/flink/pull/19377#discussion_r847088827
########## flink-architecture-tests/flink-architecture-tests-production/src/main/java/org/apache/flink/architecture/rules/ConnectorRules.java: ########## @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.architecture.rules; + +import com.tngtech.archunit.base.DescribedPredicate; +import com.tngtech.archunit.core.domain.JavaClass; +import com.tngtech.archunit.junit.ArchTest; +import com.tngtech.archunit.lang.ArchRule; +import com.tngtech.archunit.thirdparty.com.google.common.base.Joiner; + +import static com.tngtech.archunit.base.DescribedPredicate.not; +import static com.tngtech.archunit.core.domain.JavaModifier.PUBLIC; +import static com.tngtech.archunit.core.domain.properties.HasModifiers.Predicates.modifier; +import static com.tngtech.archunit.library.freeze.FreezingArchRule.freeze; +import static org.apache.flink.architecture.common.GivenJavaClasses.noJavaClassesThat; +import static org.apache.flink.architecture.common.SourcePredicates.areProductionCode; + +/** Rules for Flink connectors. */ +public class ConnectorRules { + private static final String[] CONNECTOR_PACKAGES = { + "org.apache.flink.connector..", "org.apache.flink.streaming.connectors.." + }; + + private static DescribedPredicate<JavaClass> areNotPublicAndResideOutsideOfPackages( + String... packageIdentifiers) { + return JavaClass.Predicates.resideOutsideOfPackages(packageIdentifiers) + .and(not(modifier(PUBLIC))) Review Comment: It should be number 2 -- 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