Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
64efefb6
Commit
64efefb6
authored
8 years ago
by
Dennis Ushakov
Browse files
Options
Download
Email Patches
Plain Diff
optimize check in tests
parent
a6cff6cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/core-impl/src/com/intellij/util/CachedValueLeakChecker.java
+2
-1
...re-impl/src/com/intellij/util/CachedValueLeakChecker.java
with
2 additions
and
1 deletion
+2
-1
platform/core-impl/src/com/intellij/util/CachedValueLeakChecker.java
+
2
-
1
View file @
64efefb6
...
...
@@ -43,6 +43,7 @@ class CachedValueLeakChecker {
private
static
final
Logger
LOG
=
Logger
.
getInstance
(
"#com.intellij.util.CachedValueChecker"
);
private
static
final
boolean
DO_CHECKS
=
ApplicationManager
.
getApplication
().
isUnitTestMode
();
private
static
final
Set
<
String
>
ourCheckedKeys
=
ContainerUtil
.
newConcurrentSet
();
private
static
final
boolean
JAVA9
=
SystemInfo
.
isJavaVersionAtLeast
(
"9"
);
static
void
checkProvider
(
@NotNull
final
CachedValueProvider
provider
,
@NotNull
final
Key
key
,
...
...
@@ -50,7 +51,7 @@ class CachedValueLeakChecker {
if
(!
DO_CHECKS
||
ApplicationInfoImpl
.
isInStressTest
())
return
;
if
(!
ourCheckedKeys
.
add
(
key
.
toString
()))
return
;
// store strings because keys are created afresh in each (test) project
if
(!
SystemInfo
.
isJavaVersionAtLeast
(
"9"
)
)
{
if
(!
JAVA9
)
{
findReferencedPsi
(
provider
,
userDataHolder
,
5
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment