jackye1995 commented on code in PR #6977:
URL: https://github.com/apache/iceberg/pull/6977#discussion_r1131448557


##########
api/src/test/java/org/apache/iceberg/AssertHelpers.java:
##########
@@ -23,7 +23,22 @@
 import org.apache.avro.generic.GenericRecord;
 import org.assertj.core.api.AbstractThrowableAssert;
 import org.assertj.core.api.Assertions;
+import org.assertj.core.api.ThrowableAssert;
 
+/**
+ * This class is deprecated. Please use {@link
+ * Assertions#assertThatThrownBy(ThrowableAssert.ThrowingCallable)} directly 
as shown below:
+ *
+ * <pre>
+ * Assertions.assertThatThrownBy(() -> throwingCallable)
+ *    .isInstanceOf(ExpectedException.class)
+ *    .hasMessage(expectedErrorMsg)
+ * </pre>
+ *
+ * @deprecated Use {@link 
Assertions#assertThatThrownBy(ThrowableAssert.ThrowingCallable)} directly
+ *     as it provides a more fluent way of asserting on exceptions.

Review Comment:
   I did some small tests, there is a small difference in IDE: if only the 
static method is imported the user won't see deprecation warning in code unless 
he/she looks at the import block, so it might still be beneficial to mark 
methods as deprecated as well.
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to