Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
eaa22652
Unverified
Commit
eaa22652
authored
6 years ago
by
Vladimir Krivosheev
Browse files
Options
Download
Email Patches
Plain Diff
save in tests immediately
parent
9236d522
Branches unavailable
Tags unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/credential-store/src/PasswordSafeImpl.kt
+10
-3
platform/credential-store/src/PasswordSafeImpl.kt
with
10 additions
and
3 deletions
+10
-3
platform/credential-store/src/PasswordSafeImpl.kt
+
10
-
3
View file @
eaa22652
...
...
@@ -74,7 +74,7 @@ class PasswordSafeImpl @JvmOverloads constructor(val settings: PasswordSafeSetti
private
var
_currentProvider
:
Lazy
<
CredentialStore
>
=
if
(
provider
==
null
)
SynchronizedClearableLazy
{
computeProvider
(
settings
)
}
else
lazyOf
(
provider
)
internal
val
currentProviderIfComputed
:
CredentialStore
?
private
val
currentProviderIfComputed
:
CredentialStore
?
get
()
=
if
(
_currentProvider
.
isInitialized
())
_currentProvider
.
value
else
null
internal
var
currentProvider
:
CredentialStore
...
...
@@ -154,8 +154,15 @@ class PasswordSafeImpl @JvmOverloads constructor(val settings: PasswordSafeSetti
override
fun
getAsync
(
attributes
:
CredentialAttributes
):
Promise
<
Credentials
?>
=
runAsync
{
get
(
attributes
)
}
override
fun
save
()
{
if
((
currentProviderIfComputed
as
?
KeePassCredentialStore
?:
return
).
isNeedToSave
())
{
saveAlarm
.
request
()
val
keePassCredentialStore
=
currentProviderIfComputed
as
?
KeePassCredentialStore
?:
return
if
(
ApplicationManager
.
getApplication
().
isUnitTestMode
)
{
keePassCredentialStore
.
save
()
return
}
if
(
keePassCredentialStore
.
isNeedToSave
())
{
saveAlarm
.
request
(
ApplicationManager
.
getApplication
().
isUnitTestMode
)
}
}
...
...
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
Menu
Projects
Groups
Snippets
Help