mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add NotNull
This commit is contained in:
+2
-2
@@ -54,8 +54,8 @@ final class CoverageProjectViewDirectoryNodeDecorator extends AbstractCoveragePr
|
||||
final CoverageDataManager manager = getCoverageDataManager();
|
||||
if (manager == null) return;
|
||||
final CoverageSuitesBundle currentSuite = manager.getCurrentSuitesBundle();
|
||||
final CoverageAnnotator coverageAnnotator = currentSuite != null ? currentSuite.getAnnotator(node.getProject())
|
||||
: null;
|
||||
Project project = node.getProject();
|
||||
final CoverageAnnotator coverageAnnotator = currentSuite == null || project == null ? null : currentSuite.getAnnotator(project);
|
||||
if (coverageAnnotator == null) {
|
||||
// N/A
|
||||
return;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.coverage;
|
||||
|
||||
import com.intellij.execution.configurations.ModuleBasedConfiguration;
|
||||
@@ -130,7 +131,7 @@ public class CoverageSuitesBundle {
|
||||
return myEngine.getLineMarkerRenderer(lineNumber, className, lines, coverageByTestApplicable, coverageSuite, newToOldConverter, oldToNewConverter, subCoverageActive);
|
||||
}
|
||||
|
||||
public CoverageAnnotator getAnnotator(Project project) {
|
||||
public CoverageAnnotator getAnnotator(@NotNull Project project) {
|
||||
return myEngine.getCoverageAnnotator(project);
|
||||
}
|
||||
|
||||
@@ -188,7 +189,7 @@ public class CoverageSuitesBundle {
|
||||
() -> new CachedValueProvider.Result<>(getSearchScopeInner(project), ProjectRootModificationTracker.getInstance(project)), false);
|
||||
}
|
||||
return myCachedValue.getValue();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private GlobalSearchScope getSearchScopeInner(Project project) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.coverage;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
@@ -253,7 +253,7 @@ public class JavaCoverageEngine extends CoverageEngine {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public CoverageAnnotator getCoverageAnnotator(Project project) {
|
||||
public CoverageAnnotator getCoverageAnnotator(@NotNull Project project) {
|
||||
return JavaCoverageAnnotator.getInstance(project);
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ public class JavaCoverageEngine extends CoverageEngine {
|
||||
TestFramework testFramework = TestFrameworks.detectFramework(psiClass);
|
||||
if (testFramework == null) return;
|
||||
Arrays.stream(psiClass.getAllMethods())
|
||||
.filter(method -> testFramework.isTestMethod(method) &&
|
||||
.filter(method -> testFramework.isTestMethod(method) &&
|
||||
testName.equals(CoverageListener.sanitize(method.getName(), className.length())))
|
||||
.forEach(elements::add);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user