Skip to content

Commit ed6d469

Browse files
651: Fixed Slow operations are prohibited on EDT
1 parent 10718a0 commit ed6d469

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/com/magento/idea/magento2plugin/inspections/php/util/PhpClassImplementsNoninterceptableInterfaceUtil.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package com.magento.idea.magento2plugin.inspections.php.util;
77

8+
import com.intellij.util.SlowOperations;
89
import com.jetbrains.php.lang.psi.elements.PhpClass;
910
import com.magento.idea.magento2plugin.magento.files.Plugin;
1011
import org.jetbrains.annotations.NotNull;
@@ -17,13 +18,18 @@ private PhpClassImplementsNoninterceptableInterfaceUtil() {}
1718
* Check whether class implements NoninterceptableInterface.
1819
*
1920
* @param phpClass PhpClass
21+
*
2022
* @return bool
2123
*/
2224
public static boolean execute(final @NotNull PhpClass phpClass) {
23-
final PhpClass[] interfaces = phpClass.getImplementedInterfaces();
25+
final PhpClass[] interfaces = SlowOperations.allowSlowOperations(
26+
phpClass::getImplementedInterfaces
27+
);
28+
2429
if (interfaces.length == 0) {
2530
return false;
2631
}
32+
2733
for (final PhpClass targetInterfaceClass: interfaces) {
2834
if (targetInterfaceClass.getFQN().equals(Plugin.NON_INTERCEPTABLE_FQN)) {
2935
return true;

0 commit comments

Comments
 (0)