[java] Add @NlsSafe

GitOrigin-RevId: ceeb1f5b7d19c8670951579a4bbaeaac0c06b40a
This commit is contained in:
Tagir Valeev
2025-05-13 14:04:47 +00:00
committed by intellij-monorepo-bot
parent 49fd7e450e
commit 2e85308268
4 changed files with 13 additions and 10 deletions
@@ -4,6 +4,7 @@ package com.intellij.openapi.roots.impl;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.PackageIndex;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.util.Query;
@@ -22,12 +23,12 @@ public final class ProjectPackageIndexImpl extends PackageIndex {
}
@Override
public VirtualFile @NotNull [] getDirectoriesByPackageName(@NotNull String packageName, boolean includeLibrarySources) {
public VirtualFile @NotNull [] getDirectoriesByPackageName(@NotNull @NlsSafe String packageName, boolean includeLibrarySources) {
return getDirsByPackageName(packageName, includeLibrarySources).toArray(VirtualFile.EMPTY_ARRAY);
}
@Override
public Query<VirtualFile> getDirsByPackageName(@NotNull String packageName,
public Query<VirtualFile> getDirsByPackageName(@NotNull @NlsSafe String packageName,
@NotNull GlobalSearchScope scope) {
return myDirectoryIndex.getDirectoriesByPackageName(packageName, scope);
}
@@ -38,7 +39,7 @@ public final class ProjectPackageIndexImpl extends PackageIndex {
}
@Override
public @NotNull Query<VirtualFile> getDirsByPackageName(@NotNull String packageName, boolean includeLibrarySources) {
public @NotNull Query<VirtualFile> getDirsByPackageName(@NotNull @NlsSafe String packageName, boolean includeLibrarySources) {
return myDirectoryIndex.getDirectoriesByPackageName(packageName, includeLibrarySources);
}