void (@NotNull Project project) { if (myRecentData != null && (myRecentData.project == project || !myRecentData.isValid())) { myRecentData = null; } Transferable[] contents = myCopyPasteManager.getAllContents(); for (int i = contents.length - 1; i >= 0; i--) { Transferable t = contents[i]; if (t instanceof MyTransferable) { MyData myData = ((MyTransferable)t).myDataProxy; try (AccessToken ignore = SlowOperations.knownIssue("IDEA-322955, EA-642861")) { if (!myData.isValid() || myData.project == project) { myCopyPasteManager.removeContent(t); } } } } }