FrankYang0529 commented on code in PR #69827: URL: https://github.com/apache/airflow/pull/69827#discussion_r3796849613
########## airflow-e2e-tests/java-test-bundle/src/java/org/apache/airflow/e2e/TestBundleBuilder.java: ########## @@ -0,0 +1,63 @@ +/* + * 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.airflow.e2e; + +import java.util.List; +import org.apache.airflow.sdk.*; +import org.jetbrains.annotations.NotNull; + +/** + * Bundle of deliberately broken task classes for the runner-behaviour E2E tests. + */ +public class TestBundleBuilder implements BundleBuilder { + public static class MissingNoArgConstructor implements Task { + private final String marker; + + public MissingNoArgConstructor(String marker) { + this.marker = marker; + } + + public void execute(@NotNull Context context, Client client) { + throw new IllegalStateException(marker); + } + } + + /** + * The not static only constructor implicitly takes the enclosing instance, so the + * runner's no-argument lookup fails even though no constructor is declared. + */ Review Comment: Sorry for the wrong sentence. Updated it to ``` /** * A non-static nested class declares no constructor of its own, but the implicit one * takes the enclosing instance, so the runner's lookup for a no-argument constructor * fails. */ ``` -- 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]
