IllegalArgumentException when editing xtext file

  • Operating system: Archlinux
  • SonarLint plugin version: 10.1.0
  • Programming language you’re coding in: xtext (dedicated DSL)
  • Is connected mode used:
    • Connected to SonarCloud

An IllegalArgumentException is raised when editing local xtext file.

Here is the stack trace in the SonarLint console:

SonarLint processing file /ecss-smp-versim/smdl/esa.ecss.smp.versim.xsmpcat...

Index files

1 file indexed

No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.

Available processors: 32

Using 32 threads for analysis.

1 source file to be analyzed

1/1 source file has been analyzed

Unexpected error occurred in scheduled task

java.lang.IllegalArgumentException: Collection is empty

at java.base/java.util.EnumSet.copyOf(Unknown Source)

at org.sonarsource.sonarlint.core.promotion.PromotionService.promoteExtraEnabledLanguagesInConnectedMode(PromotionService.java:62)

at org.sonarsource.sonarlint.core.promotion.PromotionService.onAnalysisFinished(PromotionService.java:53)

at jdk.internal.reflect.GeneratedMethodAccessor477.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)

at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)

at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)

at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:178)

at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:164)

at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145)

at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)

at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:391)

at org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$analyze$26(AnalysisService.java:564)

at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)

at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)

at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)

at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)

at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:154)

at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)

at java.base/java.lang.Thread.run(Unknown Source)

Found 0 issue(s)

Hi @Yannick_Daveluy,

thanks for reaching out to us. We are aware of that issue and already fixed it with THIS ticket for the next release.

The error is annoying but, luckily, has no impact on your work. Until the next release, it might be a bit noisy in the SonarLint Console, but you shouldn’t be impacted otherwise.

If you see the noise becoming too much over time, please consider rolling back to the previous release (10.0.1) and give me a response here. Once the next version is released, it should be the second to last week of May. I will ping you.

Best,
Tobias

Hello,

I have this error poping up in the console whenever I open a file which is non java (such as .bat, settings.gradle). I believe it’s harmless, but still, quite disturbing.

Unexpected error occurred in scheduled task

java.lang.IllegalArgumentException: Collection is empty
	at java.base/java.util.EnumSet.copyOf(Unknown Source)
	at org.sonarsource.sonarlint.core.promotion.PromotionService.promoteExtraEnabledLanguagesInConnectedMode(PromotionService.java:62)
	at org.sonarsource.sonarlint.core.promotion.PromotionService.onAnalysisFinished(PromotionService.java:53)
	at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
	at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
	at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:178)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:164)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:391)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$analyze$26(AnalysisService.java:564)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:154)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Unknown Source)
  • Operating system: Windows 10 22H2
  • SonarLint plugin version: SonarLint for Eclipse 10.1.0.81817
  • Programming language you’re coding in: N/A
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): No

Kind regards,
Nicolas.

1 Like

Hi @Yannick_Daveluy and @Nicolas_Baumann,

the issue was fixed in the latest release SonarLint for Eclipse 10.2.0.81875. Please update to mitigate that issue.

Best,
Tobias

I confirm that the problem is solved.
Many thanks for the fix :slight_smile:

1 Like