This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 5a562bb078 DynFields, DynMethods code cleanup  (#10543)
5a562bb078 is described below

commit 5a562bb078d30ac0633c2960e2558780cb183e89
Author: Piotr Findeisen <[email protected]>
AuthorDate: Wed Jul 17 13:49:02 2024 +0200

    DynFields, DynMethods code cleanup  (#10543)
    
    * Remove unused throws declaration
    
    Avoid a warning in an IDE.
    
    * Mark final fields as such
    
    * Prepare for removal unused DynFields, DynMethods methods
---
 common/src/main/java/org/apache/iceberg/common/DynFields.java  | 2 ++
 common/src/main/java/org/apache/iceberg/common/DynMethods.java | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/src/main/java/org/apache/iceberg/common/DynFields.java 
b/common/src/main/java/org/apache/iceberg/common/DynFields.java
index a96da85131..1b982d206f 100644
--- a/common/src/main/java/org/apache/iceberg/common/DynFields.java
+++ b/common/src/main/java/org/apache/iceberg/common/DynFields.java
@@ -394,7 +394,9 @@ public class DynFields {
      * @return a {@link StaticField} with a valid implementation
      * @throws IllegalStateException if the method is not static
      * @throws NoSuchFieldException if no implementation was found
+     * @deprecated since 1.7.0, will be removed in 2.0.0
      */
+    @Deprecated
     public <T> StaticField<T> buildStaticChecked() throws NoSuchFieldException 
{
       return this.<T>buildChecked().asStatic();
     }
diff --git a/common/src/main/java/org/apache/iceberg/common/DynMethods.java 
b/common/src/main/java/org/apache/iceberg/common/DynMethods.java
index 98de1e7f06..eaaad876f1 100644
--- a/common/src/main/java/org/apache/iceberg/common/DynMethods.java
+++ b/common/src/main/java/org/apache/iceberg/common/DynMethods.java
@@ -51,6 +51,8 @@ public class DynMethods {
           (method == null || method.isVarArgs()) ? -1 : 
method.getParameterTypes().length;
     }
 
+    /** @deprecated since 1.7.0, will be removed in 2.0.0 */
+    @Deprecated // will become private
     @SuppressWarnings("unchecked")
     public <R> R invokeChecked(Object target, Object... args) throws Exception 
{
       try {
@@ -126,7 +128,7 @@ public class DynMethods {
     private static final UnboundMethod NOOP =
         new UnboundMethod(null, "NOOP") {
           @Override
-          public <R> R invokeChecked(Object target, Object... args) throws 
Exception {
+          public <R> R invokeChecked(Object target, Object... args) {
             return null;
           }
 
@@ -313,6 +315,8 @@ public class DynMethods {
       return this;
     }
 
+    /** @deprecated since 1.7.0, will be removed in 2.0.0 */
+    @Deprecated
     public Builder ctorImpl(Class<?> targetClass, Class<?>... argClasses) {
       // don't do any work if an implementation has been found
       if (method != null) {
@@ -327,6 +331,8 @@ public class DynMethods {
       return this;
     }
 
+    /** @deprecated since 1.7.0, will be removed in 2.0.0 */
+    @Deprecated
     public Builder ctorImpl(String className, Class<?>... argClasses) {
       // don't do any work if an implementation has been found
       if (method != null) {

Reply via email to