Class Unsafe

java.lang.Object
org.apache.calcite.test.Unsafe

public class Unsafe extends Object
Contains methods that call JDK methods that the forbidden APIs checker does not approve of.

This class is excluded from the check, so methods called via this class will not fail the build.

  • Method Details

    • matches

      public static <T> boolean matches(org.hamcrest.Matcher<T> matcher, Object actual)
      Matcher.matches(Object) is forbidden in regular test code in favour of MatcherAssert.assertThat(T, org.hamcrest.Matcher<? super T>). Note: Matcher#matches is still useful when testing matcher implementations.
      Parameters:
      matcher - matcher
      actual - actual value
      Returns:
      the result of matcher.matches(actual)
    • setDefaultLocale

      public static void setDefaultLocale(Locale locale)
      Sets locale.