@Test void shouldReturnFirstNotNull() { assertThat(InjectorUtils.firstNotNull(null, "test"), equalTo("test")); assertThat(InjectorUtils.firstNotNull("rest", "pest"), equalTo("rest")); assertThat(InjectorUtils.firstNotNull(null, null), nullValue()); }
@Nullable public static <T> T firstNotNull(T obj1, T obj2) { return obj1 == null ? obj2 : obj1; }
InjectorUtils { @Nullable public static <T> T firstNotNull(T obj1, T obj2) { return obj1 == null ? obj2 : obj1; } }
InjectorUtils { @Nullable public static <T> T firstNotNull(T obj1, T obj2) { return obj1 == null ? obj2 : obj1; } private  InjectorUtils(); }
InjectorUtils { @Nullable public static <T> T firstNotNull(T obj1, T obj2) { return obj1 == null ? obj2 : obj1; } private  InjectorUtils(); static void checkNotNull(Object o); static void checkNotNull(Object o, String errorMessage); @SafeVarargs static void checkNoNullValues(T... arr); static boolean containsNullValue(Object... arr); static void checkArgument(boolean expression, String errorMessage); static void rethrowException(Exception e); @Nullable static T firstNotNull(T obj1, T obj2); static boolean canInstantiate(Class<?> clazz); }
InjectorUtils { @Nullable public static <T> T firstNotNull(T obj1, T obj2) { return obj1 == null ? obj2 : obj1; } private  InjectorUtils(); static void checkNotNull(Object o); static void checkNotNull(Object o, String errorMessage); @SafeVarargs static void checkNoNullValues(T... arr); static boolean containsNullValue(Object... arr); static void checkArgument(boolean expression, String errorMessage); static void rethrowException(Exception e); @Nullable static T firstNotNull(T obj1, T obj2); static boolean canInstantiate(Class<?> clazz);  }