This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/develop by this push:
new 7eba4b9c Add @MustOverride (#714)
7eba4b9c is described below
commit 7eba4b9c64113e7a56212825bc5f45f0d8cf3355
Author: Jiang Tian <[email protected]>
AuthorDate: Thu Jan 29 18:13:42 2026 +0800
Add @MustOverride (#714)
* add must override
* spotless
---
.../java/org/apache/tsfile/utils/MustOverride.java | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git
a/java/tsfile/src/main/java/org/apache/tsfile/utils/MustOverride.java
b/java/tsfile/src/main/java/org/apache/tsfile/utils/MustOverride.java
new file mode 100644
index 00000000..e991c3c0
--- /dev/null
+++ b/java/tsfile/src/main/java/org/apache/tsfile/utils/MustOverride.java
@@ -0,0 +1,34 @@
+/*
+ * 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.tsfile.utils;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Methods annotated by this must be overridden by all subclasses.
+ *
+ * <p>For example, if class Parent has a method m1 marked with @MustOverride,
and Child is Parent's
+ * subclass, then Child must implement m1, too.
+ */
+@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
+@Retention(RetentionPolicy.CLASS)
+public @interface MustOverride {}