From e06842e2a56531066c63550e2912696775d229bc Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 24 Feb 2025 16:15:30 +0100 Subject: [PATCH] fix method visibility (part 3) GitOrigin-RevId: 7fac25c2d91c29638f3928b5175f4249b678fefd --- .../daemon/DaemonCodeAnalyzer.java | 7 +++---- .../LocalInspectionToolSession.java | 6 ++++-- .../ex/InspectionElementsMerger.java | 10 ++++------ .../injected/InjectedEditorWindowTracker.java | 2 +- .../intellij/psi/stubs/IStubElementType.java | 9 ++++++--- .../psi/stubs/MostlyUShortIntList.java | 4 ++-- .../src/com/intellij/psi/stubs/StubList.java | 20 ++++++++++--------- .../psi/stubs/StubSerializationUtil.java | 2 +- .../openapi/editor/ex/util/SegmentArray.java | 20 ++++--------------- .../openapi/editor/impl/DocumentImpl.java | 5 +++-- .../openapi/editor/impl/IntervalTreeImpl.java | 16 ++++++++++----- .../openapi/fileEditor/impl/LoadTextUtil.java | 5 +++-- .../intellij/psi/stubs/StubBuilderType.java | 8 ++++---- .../intellij/psi/stubs/StubTreeBuilder.java | 3 ++- .../com/intellij/psi/stubs/LazyStubList.java | 6 +++--- .../psi/stubs/StubTreeSerializerBase.java | 3 +-- .../roots/ImmutableSyntheticLibrary.java | 17 +++++++++------- 17 files changed, 73 insertions(+), 70 deletions(-) diff --git a/platform/analysis-api/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzer.java b/platform/analysis-api/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzer.java index 7132b13739a0..a95f3f3cb76a 100644 --- a/platform/analysis-api/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzer.java +++ b/platform/analysis-api/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzer.java @@ -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-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.daemon; import com.intellij.lang.annotation.Annotation; @@ -119,8 +119,7 @@ public abstract class DaemonCodeAnalyzer { * Internal class for reporting annotator-related statistics */ @ApiStatus.Internal - final - class AnnotatorStatistics { + final class AnnotatorStatistics { /** the annotator this statistics is generated for */ public final Annotator annotator; /** timestamp (in {@link System#nanoTime} sense) of the {@link #annotator} creation */ @@ -136,7 +135,7 @@ public abstract class DaemonCodeAnalyzer { /** timestamp (in {@link System#nanoTime} sense) of the moment when all the {@link Annotator#annotate(PsiElement, AnnotationHolder)} methods are called */ public long annotatorFinishStamp; - AnnotatorStatistics(@NotNull Annotator annotator) { + public AnnotatorStatistics(@NotNull Annotator annotator) { this.annotator = annotator; } diff --git a/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionToolSession.java b/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionToolSession.java index 3d13153e838e..b64aee97f693 100644 --- a/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionToolSession.java +++ b/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionToolSession.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInspection; @@ -6,6 +6,7 @@ import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.UserDataHolderBase; import com.intellij.psi.PsiFile; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -19,7 +20,8 @@ public final class LocalInspectionToolSession extends UserDataHolderBase { private final TextRange myRestrictRange; private final HighlightSeverity myMinimumSeverity; - LocalInspectionToolSession(@NotNull PsiFile file, @NotNull TextRange priorityRange, @NotNull TextRange restrictRange, + @ApiStatus.Internal + public LocalInspectionToolSession(@NotNull PsiFile file, @NotNull TextRange priorityRange, @NotNull TextRange restrictRange, @Nullable HighlightSeverity minimumSeverity) { myFile = file; myPriorityRange = priorityRange; diff --git a/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionElementsMerger.java b/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionElementsMerger.java index 110048e6a8c1..cc128a320412 100644 --- a/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionElementsMerger.java +++ b/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionElementsMerger.java @@ -1,13 +1,10 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInspection.ex; import com.intellij.openapi.extensions.ExtensionPointName; import com.intellij.util.ArrayUtil; import com.intellij.util.ArrayUtilRt; -import org.jetbrains.annotations.Contract; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.*; import java.util.List; import java.util.concurrent.ConcurrentHashMap; @@ -36,7 +33,8 @@ public abstract class InspectionElementsMerger { return additionalMerger; } - static void addMerger(@NotNull String shortName, @NotNull InspectionElementsMerger merger) { + @ApiStatus.Internal + public static void addMerger(@NotNull String shortName, @NotNull InspectionElementsMerger merger) { ourAdditionalMergers.put(shortName, merger); } diff --git a/platform/analysis-api/src/com/intellij/psi/impl/source/tree/injected/InjectedEditorWindowTracker.java b/platform/analysis-api/src/com/intellij/psi/impl/source/tree/injected/InjectedEditorWindowTracker.java index 40f31649cb5a..500e9d030cff 100644 --- a/platform/analysis-api/src/com/intellij/psi/impl/source/tree/injected/InjectedEditorWindowTracker.java +++ b/platform/analysis-api/src/com/intellij/psi/impl/source/tree/injected/InjectedEditorWindowTracker.java @@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull; @ApiStatus.Internal public abstract class InjectedEditorWindowTracker { - static InjectedEditorWindowTracker getInstance() { + public static InjectedEditorWindowTracker getInstance() { return ApplicationManager.getApplication().getService(InjectedEditorWindowTracker.class); } diff --git a/platform/core-api/src/com/intellij/psi/stubs/IStubElementType.java b/platform/core-api/src/com/intellij/psi/stubs/IStubElementType.java index 8f645c4d3ba9..db3c9d1a2c43 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/IStubElementType.java +++ b/platform/core-api/src/com/intellij/psi/stubs/IStubElementType.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 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.lang.ASTNode; @@ -9,6 +9,7 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.tree.IElementType; import com.intellij.util.containers.ContainerUtil; import kotlin.Unit; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -60,11 +61,13 @@ public abstract class IStubElementType, PsiT extend } } - static void dropRegisteredTypes() { + @ApiStatus.Internal + public static void dropRegisteredTypes() { lazyExternalIds = NOT_INITIALIZED_SET; } - static @NotNull List loadRegisteredStubElementTypes() { + @ApiStatus.Internal + public static @NotNull List loadRegisteredStubElementTypes() { List result = new ArrayList<>(); Logger logger = Logger.getInstance(IStubElementType.class); diff --git a/platform/core-api/src/com/intellij/psi/stubs/MostlyUShortIntList.java b/platform/core-api/src/com/intellij/psi/stubs/MostlyUShortIntList.java index b341528cb0b4..e691b89e7f5a 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/MostlyUShortIntList.java +++ b/platform/core-api/src/com/intellij/psi/stubs/MostlyUShortIntList.java @@ -14,7 +14,7 @@ public final class MostlyUShortIntList implements IntUnaryOperator { private int mySize; private StrippedIntOpenHashMap myMap; - MostlyUShortIntList(int initialCapacity) { + public MostlyUShortIntList(int initialCapacity) { myData = new char[initialCapacity]; } @@ -31,7 +31,7 @@ public final class MostlyUShortIntList implements IntUnaryOperator { } } - void add(int value) { + public void add(int value) { if (value < 0 || value >= IN_MAP) { initMap().put(mySize, value); value = IN_MAP; diff --git a/platform/core-api/src/com/intellij/psi/stubs/StubList.java b/platform/core-api/src/com/intellij/psi/stubs/StubList.java index 17e555bd3abc..d78028b81b80 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/StubList.java +++ b/platform/core-api/src/com/intellij/psi/stubs/StubList.java @@ -37,13 +37,13 @@ public abstract class StubList extends AbstractList> { private @Nullable TempState myTempState = new TempState(); - StubList(int initialCapacity) { + public StubList(int initialCapacity) { myStubData = new MostlyUShortIntList(initialCapacity * 3); myJoinedChildrenList = new MostlyUShortIntList(initialCapacity); myJoinedChildrenList.add(0); // indices in this list should be non-zero } - @NotNull IElementType getStubElementType(int id) { + public @NotNull IElementType getStubElementType(int id) { return IElementType.find(getStubTypeIndex(id)); } @@ -63,11 +63,11 @@ public abstract class StubList extends AbstractList> { return myStubData.get(childrenStartIndex(id)); } - int getChildrenCount(int id) { + public int getChildrenCount(int id) { return myStubData.get(childrenCountIndex(id)); } - void addStub(@NotNull StubBase stub, @Nullable StubBase parent, @Nullable IElementType type) { + public void addStub(@NotNull StubBase stub, @Nullable StubBase parent, @Nullable IElementType type) { int stubId = size(); stub.id = stubId; @@ -83,7 +83,7 @@ public abstract class StubList extends AbstractList> { return parentId >= 0 && childId != parentId + 1 && getChildrenCount(parentId) == 0; } - void addStub(int childId, int parentId, short elementTypeIndex) { + public void addStub(int childId, int parentId, short elementTypeIndex) { assert myTempState != null; myStubData.add(elementTypeIndex); myStubData.add(0); myStubData.add(0); @@ -130,7 +130,8 @@ public abstract class StubList extends AbstractList> { } } - void prepareForChildren(int parentId, int childrenCount) { + @ApiStatus.Internal + public void prepareForChildren(int parentId, int childrenCount) { assert myTempState != null; myTempState.prepareForChildren(parentId, childrenCount); } @@ -217,11 +218,12 @@ public abstract class StubList extends AbstractList> { return (List)this; } - boolean isChildrenLayoutOptimal() { + @ApiStatus.Internal + public boolean isChildrenLayoutOptimal() { return myTempState == null || myTempState.myTempJoinedChildrenMap == null; } - boolean areChildrenNonAdjacent(int childId, int parentId) { + public boolean areChildrenNonAdjacent(int childId, int parentId) { return getParentIndex(childId - 1) != parentId; } @@ -323,7 +325,7 @@ final class MaterialStubList extends StubList { } @Override - void addStub(@NotNull StubBase stub, @Nullable StubBase parent, @Nullable IElementType type) { + public void addStub(@NotNull StubBase stub, @Nullable StubBase parent, @Nullable IElementType type) { super.addStub(stub, parent, type); myPlainList.add(stub); } diff --git a/platform/core-api/src/com/intellij/psi/stubs/StubSerializationUtil.java b/platform/core-api/src/com/intellij/psi/stubs/StubSerializationUtil.java index 98ba42c62451..b0d2cbab5b9c 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/StubSerializationUtil.java +++ b/platform/core-api/src/com/intellij/psi/stubs/StubSerializationUtil.java @@ -26,7 +26,7 @@ public final class StubSerializationUtil { * @param root - serializer which couldn't deserialize stub * @return message for broken stub format */ - static @NotNull @NonNls String brokenStubFormat(@NotNull ObjectStubSerializer root, @Nullable PsiFile file) { + public static @NotNull @NonNls String brokenStubFormat(@NotNull ObjectStubSerializer root, @Nullable PsiFile file) { String fileInfo = file == null ? "" : " in file " + file.getName(); return "Broken stub format" + fileInfo + ", most likely version of " + root + " (" + root.getExternalId() + ") was not updated after serialization changes\n"; } diff --git a/platform/core-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java b/platform/core-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java index 4efef996bc78..5ed747da1df6 100644 --- a/platform/core-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java +++ b/platform/core-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java @@ -1,22 +1,9 @@ -/* - * Copyright 2000-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.editor.ex.util; import com.intellij.openapi.diagnostic.Logger; import com.intellij.util.ArrayUtil; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; /** @@ -63,7 +50,8 @@ public class SegmentArray { System.arraycopy(data.myEnds, 0, myEnds, startOffset, len); } - static int calcCapacity(int currentArraySize, int index) { + @ApiStatus.Internal + public static int calcCapacity(int currentArraySize, int index) { if (currentArraySize == 0) { currentArraySize = 16; } diff --git a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java index ec52694de232..83f1d3ac434c 100644 --- a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java @@ -199,7 +199,8 @@ public final class DocumentImpl extends UserDataHolderBase implements DocumentEx /** * makes range marker without creating the document (which could be expensive) */ - static @NotNull RangeMarker createRangeMarkerForVirtualFile(@NotNull VirtualFile file, + @ApiStatus.Internal + public static @NotNull RangeMarker createRangeMarkerForVirtualFile(@NotNull VirtualFile file, int offset, int startLine, int startCol, @@ -224,8 +225,8 @@ public final class DocumentImpl extends UserDataHolderBase implements DocumentEx tree.addInterval(marker, offset, offset, false, false, false, 0); return marker; - } + public boolean setAcceptSlashR(boolean accept) { try { return myAcceptSlashR; diff --git a/platform/core-impl/src/com/intellij/openapi/editor/impl/IntervalTreeImpl.java b/platform/core-impl/src/com/intellij/openapi/editor/impl/IntervalTreeImpl.java index 05771c68c048..fa0e1b27ddf4 100644 --- a/platform/core-impl/src/com/intellij/openapi/editor/impl/IntervalTreeImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/editor/impl/IntervalTreeImpl.java @@ -244,6 +244,7 @@ public abstract class IntervalTreeImpl extends RedBlackTree implements Int delta += change; } } + void clearDelta() { if (delta != 0) { setCachedValues(0, false, 0); // deltaUpToRoot is not valid anymore @@ -393,6 +394,7 @@ public abstract class IntervalTreeImpl extends RedBlackTree implements Int return "wRef: " + get(); } } + private static final class StaticSupplier implements Supplier { private final T myT; @@ -416,6 +418,7 @@ public abstract class IntervalTreeImpl extends RedBlackTree implements Int assert isAcquired(l.writeLock()) : l.writeLock(); } } + private static boolean isAcquired(@NotNull Lock l) { @NonNls String s = l.toString(); return s.contains("Locked by thread"); @@ -437,6 +440,7 @@ public abstract class IntervalTreeImpl extends RedBlackTree implements Int protected abstract @NotNull IntervalNode createNewNode(@NotNull T key, int start, int end, boolean greedyToLeft, boolean greedyToRight, boolean stickingToRight, int layer); protected abstract IntervalNode lookupNode(@NotNull T key); + protected abstract void setNode(@NotNull T key, @Nullable IntervalNode node); private int compareNodes(@NotNull IntervalNode i1, int delta1, @NotNull IntervalNode i2, int delta2, @NotNull List> invalid) { @@ -1409,11 +1413,13 @@ public abstract class IntervalTreeImpl extends RedBlackTree implements Int } // combines iterators for two trees in one using the specified comparator - static @NotNull MarkupIterator mergingOverlappingIterator(@NotNull IntervalTreeImpl tree1, - @NotNull TextRange tree1Range, - @NotNull IntervalTreeImpl tree2, - @NotNull TextRange tree2Range, - @NotNull Comparator comparator) { + @ApiStatus.Internal + public static @NotNull MarkupIterator mergingOverlappingIterator( + @NotNull IntervalTreeImpl tree1, + @NotNull TextRange tree1Range, + @NotNull IntervalTreeImpl tree2, + @NotNull TextRange tree2Range, + @NotNull Comparator comparator) { MarkupIterator exact = tree1.overlappingIterator(tree1Range); MarkupIterator lines = tree2.overlappingIterator(tree2Range); return MarkupIterator.mergeIterators(exact, lines, comparator); diff --git a/platform/core-impl/src/com/intellij/openapi/fileEditor/impl/LoadTextUtil.java b/platform/core-impl/src/com/intellij/openapi/fileEditor/impl/LoadTextUtil.java index 06da5261ba46..a96f1837e4b8 100644 --- a/platform/core-impl/src/com/intellij/openapi/fileEditor/impl/LoadTextUtil.java +++ b/platform/core-impl/src/com/intellij/openapi/fileEditor/impl/LoadTextUtil.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.fileEditor.impl; import com.intellij.openapi.diagnostic.Logger; @@ -585,7 +585,8 @@ public final class LoadTextUtil { } } - static @NotNull Set detectAllLineSeparators(@NotNull VirtualFile virtualFile) { + @ApiStatus.Internal + public static @NotNull Set detectAllLineSeparators(@NotNull VirtualFile virtualFile) { byte[] bytes; try { bytes = virtualFile.contentsToByteArray(); diff --git a/platform/core-impl/src/com/intellij/psi/stubs/StubBuilderType.java b/platform/core-impl/src/com/intellij/psi/stubs/StubBuilderType.java index 924d993a4425..a165149fdf10 100644 --- a/platform/core-impl/src/com/intellij/psi/stubs/StubBuilderType.java +++ b/platform/core-impl/src/com/intellij/psi/stubs/StubBuilderType.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 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.diagnostic.PluginException; @@ -18,7 +18,7 @@ import java.util.List; import java.util.Objects; @ApiStatus.Internal -public class StubBuilderType { +public final class StubBuilderType { private static final Logger LOG = Logger.getInstance(StubBuilderType.class); private final LanguageStubDescriptor myStubDescriptor; private final List myProperties; @@ -39,7 +39,7 @@ public class StubBuilderType { myProperties = Collections.emptyList(); } - StubBuilderType(@NotNull BinaryFileStubBuilder.CompositeBinaryFileStubBuilder binaryFileStubBuilder, + StubBuilderType(@NotNull BinaryFileStubBuilder.CompositeBinaryFileStubBuilder binaryFileStubBuilder, @Nullable Object binarySubBuilder) { myStubDescriptor = null; myBinaryFileStubBuilder = binaryFileStubBuilder; @@ -47,7 +47,7 @@ public class StubBuilderType { myProperties = Collections.emptyList(); } - @NotNull Class getClassToBlameInCaseOfException() { + public @NotNull Class getClassToBlameInCaseOfException() { if (myStubDescriptor != null) { return myStubDescriptor.getFileElementType().getClass(); } diff --git a/platform/core-impl/src/com/intellij/psi/stubs/StubTreeBuilder.java b/platform/core-impl/src/com/intellij/psi/stubs/StubTreeBuilder.java index 9c4dbcda4d22..588e35fd46ca 100644 --- a/platform/core-impl/src/com/intellij/psi/stubs/StubTreeBuilder.java +++ b/platform/core-impl/src/com/intellij/psi/stubs/StubTreeBuilder.java @@ -45,7 +45,8 @@ public final class StubTreeBuilder { private StubTreeBuilder() { } - static boolean requiresContentToFindBuilder(@NotNull FileType fileType) { + @ApiStatus.Internal + public static boolean requiresContentToFindBuilder(@NotNull FileType fileType) { BinaryFileStubBuilder builder = BinaryFileStubBuilders.INSTANCE.forFileType(fileType); return builder instanceof BinaryFileStubBuilder.CompositeBinaryFileStubBuilder; } diff --git a/platform/indexing-impl/src/com/intellij/psi/stubs/LazyStubList.java b/platform/indexing-impl/src/com/intellij/psi/stubs/LazyStubList.java index 3fcf7c764912..c83e8b0f077c 100644 --- a/platform/indexing-impl/src/com/intellij/psi/stubs/LazyStubList.java +++ b/platform/indexing-impl/src/com/intellij/psi/stubs/LazyStubList.java @@ -35,17 +35,17 @@ final class LazyStubList extends StubList { } @Override - void addStub(@NotNull StubBase stub, @Nullable StubBase parent, @Nullable IElementType type) { + public void addStub(@NotNull StubBase stub, @Nullable StubBase parent, @Nullable IElementType type) { // stub is lazily created, so we already know all structures, so do nothing } - void addLazyStub(IElementType type, int childIndex, int parentIndex) { + public void addLazyStub(IElementType type, int childIndex, int parentIndex) { addStub(childIndex, parentIndex, type.getIndex()); mySize++; } @Override - boolean areChildrenNonAdjacent(int childId, int parentId) { + public boolean areChildrenNonAdjacent(int childId, int parentId) { return false; } diff --git a/platform/indexing-impl/src/com/intellij/psi/stubs/StubTreeSerializerBase.java b/platform/indexing-impl/src/com/intellij/psi/stubs/StubTreeSerializerBase.java index 66bc246e023e..9e93e2257c41 100644 --- a/platform/indexing-impl/src/com/intellij/psi/stubs/StubTreeSerializerBase.java +++ b/platform/indexing-impl/src/com/intellij/psi/stubs/StubTreeSerializerBase.java @@ -28,8 +28,7 @@ public abstract class StubTreeSerializerBase { stubStringInterner = useStubStringInterner ? StubStringInterner.getInstance() : UnaryOperator.identity(); } - @NotNull - public Stub deserialize(@NotNull InputStream stream) throws IOException, SerializerNotFoundException { + public @NotNull Stub deserialize(@NotNull InputStream stream) throws IOException, SerializerNotFoundException { FileLocalStringEnumerator storage = new FileLocalStringEnumerator(false); StubInputStream inputStream = new StubInputStream(stream, storage); diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java b/platform/projectModel-api/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java index a9c1d513b7ca..43cdcfd0071a 100644 --- a/platform/projectModel-api/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java +++ b/platform/projectModel-api/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java @@ -8,7 +8,10 @@ import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.*; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.Set; @ApiStatus.Internal public class ImmutableSyntheticLibrary extends SyntheticLibrary { @@ -18,12 +21,12 @@ public class ImmutableSyntheticLibrary extends SyntheticLibrary { private final Condition myExcludeCondition; private final int hashCode; - ImmutableSyntheticLibrary(@Nullable String comparisonId, - @NotNull List sourceRoots, - @NotNull List binaryRoots, - @NotNull Set excludedRoots, - @Nullable Condition excludeCondition, - @Nullable ExcludeFileCondition constantCondition) { + public ImmutableSyntheticLibrary(@Nullable String comparisonId, + @NotNull List sourceRoots, + @NotNull List binaryRoots, + @NotNull Set excludedRoots, + @Nullable Condition excludeCondition, + @Nullable ExcludeFileCondition constantCondition) { super(comparisonId, constantCondition); mySourceRoots = List.copyOf(sourceRoots); myBinaryRoots = List.copyOf(binaryRoots);