NonBlockingReadAction<T> (Object @NotNull ... equality) { if (myCoalesceEquality != null) throw new IllegalStateException("Setting equality twice is not allowed"); if (equality.length == 0) throw new IllegalArgumentException("Equality should include at least one object"); if (equality.length == 1 && isTooCommon(equality[0])) { throw new IllegalArgumentException( "Equality should be unique: passing " + equality[0] + " is likely to interfere with unrelated computations from different places"); } return new NonBlockingReadActionImpl<>(myOriginalComputation, myModalityState, myUiThreadAction, myConstraints, myCancellationConditions, myDisposables, new ArrayList<>(Arrays.asList(equality)), myProgressIndicator); }