Skip to content

Commit

Permalink
PsiFileStubImpl#getStubType() is always null
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 4ad1bf78639f825b43a141c7095de537019876aa
  • Loading branch information
maxmedvedev authored and intellij-monorepo-bot committed Dec 7, 2024
1 parent 5e8cc2b commit 2d82f59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.intellij.psi.PsiFile;
import com.intellij.psi.impl.source.PsiFileImpl;
import com.intellij.psi.impl.source.PsiFileWithStubSupport;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.IStubFileElementType;
import com.intellij.util.SmartList;
import org.jetbrains.annotations.ApiStatus;
Expand Down Expand Up @@ -113,7 +114,7 @@ private static StubTree getOrCalcStubTree(PsiFile stubBindingRoot) {

public void setStubRoots(PsiFileStub<?> @NotNull [] roots) {
if (roots.length == 0) {
Logger.getInstance(getClass()).error("Incorrect psi file stub roots count" + this + "," + getStubType());
Logger.getInstance(getClass()).error("Incorrect psi file stub roots count" + this);
}
myStubRoots = roots;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.stubs;

import com.intellij.openapi.diagnostic.Logger;
Expand Down Expand Up @@ -77,7 +77,7 @@ void serialize(@NotNull Stub rootStub, @NotNull OutputStream stream) throws IOEx
if (rootStub instanceof PsiFileStubImpl<?> fileStub) {
PsiFileStub<?>[] roots = fileStub.getStubRoots();
if (roots.length == 0) {
Logger.getInstance(getClass()).error("Incorrect stub files count during serialization:" + rootStub + "," + rootStub.getStubType());
Logger.getInstance(getClass()).error("Incorrect stub files count during serialization:" + rootStub);
}
else {
doDefaultSerialization = false;
Expand Down

0 comments on commit 2d82f59

Please sign in to comment.