LuciferYang edited a comment on pull request #31815: URL: https://github.com/apache/spark/pull/31815#issuecomment-799050357
@maropu methods with @deprecated as follows: 1. org.junit.rules.ExpectedException.none() https://github.com/junit-team/junit4/blob/9ad61c6bf757be8d8968fd5977ab3ae15b0c5aba/src/main/java/org/junit/rules/ExpectedException.java#L111-L124 ``` /** * Returns a {@linkplain TestRule rule} that expects no exception to * be thrown (identical to behavior without this rule). * * @deprecated Since 4.13 * {@link org.junit.Assert#assertThrows(Class, org.junit.function.ThrowingRunnable) * Assert.assertThrows} can be used to verify that your code throws a specific * exception. */ @Deprecated public static ExpectedException none() { return new ExpectedException(); } ``` 2. org.junit.Assert#assertThat(T, org.hamcrest.Matcher<? super T>) https://github.com/junit-team/junit4/blob/9ad61c6bf757be8d8968fd5977ab3ae15b0c5aba/src/main/java/org/junit/Assert.java#L902-L931 ``` /** * Asserts that <code>actual</code> satisfies the condition specified by * <code>matcher</code>. If not, an {@link AssertionError} is thrown with * information about the matcher and failing value. Example: * * <pre> * assertThat(0, is(1)); // fails: * // failure message: * // expected: is <1> * // got value: <0> * assertThat(0, is(not(1))) // passes * </pre> * * <code>org.hamcrest.Matcher</code> does not currently document the meaning * of its type parameter <code>T</code>. This method assumes that a matcher * typed as <code>Matcher<T></code> can be meaningfully applied only * to values that could be assigned to a variable of type <code>T</code>. * * @param <T> the static type accepted by the matcher (this can flag obvious * compile-time problems such as {@code assertThat(1, is("a"))} * @param actual the computed value being compared * @param matcher an expression, built of {@link Matcher}s, specifying allowed * values * @see org.hamcrest.CoreMatchers * @deprecated use {@code org.hamcrest.MatcherAssert.assertThat()} */ @Deprecated public static <T> void assertThat(T actual, Matcher<? super T> matcher) { assertThat("", actual, matcher); } ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
