Skip to content

Commit 8690530

Browse files
authored
Merge pull request #1531 from magento/1306-Must_not_start_write_action_from_within_read_action_in_the_other_thread
1306: Must not start write action from within read action in the othe…
2 parents 5df4284 + 7c0e1fc commit 8690530

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
99
### Fixed
1010

1111
- java.lang.NoClassDefFoundError: org/codehaus/plexus/util/StringUtils [#1530](https://github.com/magento/magento2-phpstorm-plugin/pull/1530)
12+
- java.lang.Throwable: Must not start write action from within read action in the other thread - deadlock is coming [#1531](https://github.com/magento/magento2-phpstorm-plugin/pull/1531)
1213

1314
## 5.1.0
1415

src/com/magento/idea/magento2plugin/inspections/php/fix/PhpModuleNameQuickFix.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import com.intellij.codeInspection.LocalQuickFix;
99
import com.intellij.codeInspection.ProblemDescriptor;
10-
import com.intellij.openapi.command.WriteCommandAction;
1110
import com.intellij.openapi.project.Project;
1211
import com.jetbrains.php.lang.psi.elements.StringLiteralExpression;
1312
import com.magento.idea.magento2plugin.bundles.InspectionBundle;
@@ -42,11 +41,6 @@ public void applyFix(
4241
}
4342

4443
private void applyFix(final StringLiteralExpression expression) {
45-
WriteCommandAction.writeCommandAction(
46-
expression.getManager().getProject(),
47-
expression.getContainingFile()
48-
).run(() ->
49-
expression.updateText(expectedModuleName)
50-
);
44+
expression.updateText(expectedModuleName);
5145
}
5246
}

src/com/magento/idea/magento2plugin/inspections/xml/fix/XmlModuleNameQuickFix.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import com.intellij.codeInspection.LocalQuickFix;
99
import com.intellij.codeInspection.ProblemDescriptor;
10-
import com.intellij.openapi.command.WriteCommandAction;
1110
import com.intellij.openapi.project.Project;
1211
import com.intellij.psi.xml.XmlAttribute;
1312
import com.intellij.psi.xml.XmlAttributeValue;
@@ -42,12 +41,7 @@ public void applyFix(
4241
}
4342

4443
private void applyFix(final XmlAttributeValue value) {
45-
WriteCommandAction.writeCommandAction(
46-
value.getManager().getProject(),
47-
value.getContainingFile()
48-
).run(() ->
49-
doFix(value)
50-
);
44+
doFix(value);
5145
}
5246

5347
protected void doFix(

0 commit comments

Comments
 (0)