[Bug] StringIndexOutOfBoundsException during UCT inspection via action execution
See original GitHub issueDescribe the bug (*)
A clear and concise description of what the bug is.
java.lang.StringIndexOutOfBoundsException: begin 0, end 39, length 38
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at com.magento.idea.magento2uct.util.php.MagentoTypeEscapeUtil.escape(MagentoTypeEscapeUtil.java:35)
at com.magento.idea.magento2uct.versioning.VersionStateManager.escapeFqn(VersionStateManager.java:186)
at com.magento.idea.magento2uct.versioning.VersionStateManager.isDeprecated(VersionStateManager.java:62)
at com.magento.idea.magento2uct.inspections.php.deprecation.CallingDeprecatedMethod.execute(CallingDeprecatedMethod.java:31)
at com.magento.idea.magento2uct.inspections.php.CallMethodInspection$1.visitPhpMethodReference(CallMethodInspection.java:43)
at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.accept(MethodReferenceImpl.java:44)
at com.jetbrains.php.lang.psi.elements.impl.PhpASTElementImpl.accept(PhpASTElementImpl.java:26)
at com.magento.idea.magento2uct.inspections.UctInspectionManager.run(UctInspectionManager.java:69)
at com.magento.idea.magento2uct.execution.GenerateUctReportCommand.lambda$execute$0(GenerateUctReportCommand.java:120)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:828)
at com.magento.idea.magento2uct.execution.GenerateUctReportCommand.lambda$execute$2(GenerateUctReportCommand.java:104)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:265)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:829)
To Reproduce (*)
Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior (*)
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Please complete the following information: (*)
- OS: Mac OS X 11.6
- PhpStorm/Intellij version: 2021.2.2
- Plugin Version: 4.2.0
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
StringIndexOutOfBoundsException on test failure · Issue #2077
I am not using the build cache, and the build is not parallel. The gradle wrapper version is 3.5. The failing test is...
Read more >How to Handle String Index Out Of Bounds Exception in Java
The StringOutOfBoundsException in Java that occurs when accessing a string at an index which is negative/greater than the string length.
Read more >What is a StringIndexOutOfBoundsException? How can I fix it?
IndexOutOfBoundsException is a subclass of RuntimeException mean it is an unchecked exception which is thrown to indicate that an index of some ...
Read more >4.2.2 Release - magento/magento2-phpstorm-plugin Wiki
A StringIndexOutOfBoundsException during UCT inspection via action execution. A NullPointerException in the PluginDeclarationInspection.
Read more >String index out of range: -16" in Power Center - Search
The substring function in Java transformation gives a StringIndexOutOfBoundsException error while incorrect value is defined in one of its ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @bohdan-harniuk , I re-checked with a 4.2.2 plugin version on the same project - everything is working fine. Thanks for the fix!
Hi, @karyna-tsymbal-atwix!
Thank you for your assistance!