krasa / GrepConsole

IntelliJ plugin - https://plugins.jetbrains.com/plugin/7125
Apache License 2.0
440 stars 57 forks source link

Argument for @NotNull parameter 'id' #101

Closed AntoniRokitnicki closed 6 years ago

AntoniRokitnicki commented 6 years ago

Version: 7.2.162.000.0

Argument for @NotNull parameter 'id' of com/intellij/execution/ui/layout/impl/RunnerLayoutUiImpl.createContent must not be null java.lang.IllegalArgumentException: Argument for @NotNull parameter 'id' of com/intellij/execution/ui/layout/impl/RunnerLayoutUiImpl.createContent must not be null at com.intellij.execution.ui.layout.impl.RunnerLayoutUiImpl.$$$reportNull$$$0(RunnerLayoutUiImpl.java) at com.intellij.execution.ui.layout.impl.RunnerLayoutUiImpl.createContent(RunnerLayoutUiImpl.java) at krasa.grepconsole.grep.OpenGrepConsoleAction.createGrepConsole(OpenGrepConsoleAction.java:93) at krasa.grepconsole.grep.PinnedGrepsReopener$1.initConsole(PinnedGrepsReopener.java:70) at krasa.grepconsole.grep.PinnedGrepsReopener$1.lambda$0(PinnedGrepsReopener.java:54)

krasa commented 6 years ago

IDE version? Does it always happen? Any idea how to reproduce it?

AntoniRokitnicki commented 6 years ago

2017.3.2

no idea, it just happens.

I feel that the biggest problem is that

@Nullable protected String getContentType(@NotNull RunnerLayoutUi runnerLayoutUi) {

is Nullable, but

@NotNull public Content createContent(@NotNull String id,

expect NotNull

is that id really imporant ? maybe you could pass any notNull value if method returns null ?

krasa commented 6 years ago

Well, it is kinda confusing, but I check in #update that it is not null, so it should not be null.

I suspect there is some multithreading issue because it can also return wrong value - and then it puts the console into e.g. variables tab when debugging.

krasa commented 6 years ago

This should help, but will not work properly for things like "XSLT-Output" whatever that may be.