Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImpEx: alignment strategy is not file specific and fails in multithreading environment #454

Merged
merged 1 commit into from
May 27, 2023

Conversation

mlytvyn
Copy link
Collaborator

@mlytvyn mlytvyn commented May 27, 2023

java.lang.IndexOutOfBoundsException: Index 8 out of bounds for length 8
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
	at java.base/java.util.Objects.checkIndex(Objects.java:361)
	at java.base/java.util.ArrayList.get(ArrayList.java:427)
	at com.intellij.idea.plugin.hybris.impex.formatting.ColumnsAlignmentStrategy.getAlignment(ColumnsAlignmentStrategy.java:62)
	at com.intellij.idea.plugin.hybris.impex.formatting.ImpexBlock.buildChildren(ImpexBlock.java:74)
	at com.intellij.psi.formatter.common.AbstractBlock.getSubBlocks(AbstractBlock.java:48)
	at com.intellij.formatting.InitialInfoBuilder.buildFrom(InitialInfoBuilder.java:137)
	at com.intellij.formatting.InitialInfoBuilder.doIteration(InitialInfoBuilder.java:212)
	at com.intellij.formatting.InitialInfoBuilder.iteration(InitialInfoBuilder.java:109)
	at com.intellij.formatting.engine.WrapBlocksState.doIteration(WrapBlocksState.java:47)
	at com.intellij.formatting.engine.State.iteration(State.java:25)
	at com.intellij.formatting.engine.StateProcessor.iteration(StateProcessor.java:26)
	at com.intellij.formatting.FormatProcessor.iteration(FormatProcessor.java:108)
	at com.intellij.formatting.FormatterImpl$MyFormattingTask.iteration(FormatterImpl.java:690)
	at com.intellij.formatting.FormatterImpl.execute(FormatterImpl.java:268)
	at com.intellij.formatting.FormatterImpl.format(FormatterImpl.java:235)
	at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.processRange(CodeFormatterFacade.java:114)
	at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.processElement(CodeFormatterFacade.java:65)
	at com.intellij.formatting.service.CoreFormattingService.formatElement(CoreFormattingService.java:44)
	at com.intellij.formatting.service.FormattingServiceUtil.formatElement(FormattingServiceUtil.java:67)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformat(CodeStyleManagerImpl.java:79)
	at com.intellij.codeInspection.incorrectFormatting.FormattingChangesKt.detectFormattingChanges(FormattingChanges.kt:68)
	at com.intellij.formatting.visualLayer.VisualFormattingLayerServiceImpl.collectVisualFormattingLayerElements$lambda$9(VisualFormattingLayerServiceImpl.kt:58)
	at com.intellij.application.options.CodeStyle.doWithTemporarySettings(CodeStyle.java:314)
	at com.intellij.formatting.visualLayer.VisualFormattingLayerServiceImpl.collectVisualFormattingLayerElements(VisualFormattingLayerServiceImpl.kt:56)
	at com.intellij.formatting.visualLayer.VisualFormattingLayerHighlightingPass.doCollectInformation(VisualFormattingLayerHighlightingPass.kt:28)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:391)
	at com.intellij.platform.diagnostic.telemetry.impl.TraceKt.runWithSpanIgnoreThrows(trace.kt:82)
	at com.intellij.platform.diagnostic.telemetry.impl.TraceUtil.runWithSpanThrows(TraceUtil.java:24)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:387)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1149)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:378)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:377)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:353)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:211)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:351)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

@mlytvyn mlytvyn added this to the Release 2023.2 milestone May 27, 2023
@mlytvyn mlytvyn merged commit c2ce5ff into epam:release/2023.2 May 27, 2023
@mlytvyn mlytvyn deleted the fix/2023.2/impex_alignment branch May 27, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant