|
1 | 1 | package org.cryptomator.linux.keychain; |
2 | 2 |
|
3 | | -import com.google.common.base.Preconditions; |
4 | 3 | import org.cryptomator.integrations.common.OperatingSystem; |
5 | 4 | import org.cryptomator.integrations.common.Priority; |
6 | 5 | import org.cryptomator.integrations.keychain.KeychainAccessException; |
7 | 6 | import org.cryptomator.integrations.keychain.KeychainAccessProvider; |
| 7 | +import org.cryptomator.linux.util.CheckUtil; |
8 | 8 | import org.freedesktop.dbus.connections.impl.DBusConnection; |
9 | 9 | import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder; |
10 | 10 | import org.freedesktop.dbus.exceptions.DBusConnectionException; |
@@ -49,25 +49,25 @@ public boolean isLocked() { |
49 | 49 |
|
50 | 50 | @Override |
51 | 51 | public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException { |
52 | | - Preconditions.checkState(wallet.isPresent(), "Keychain not supported."); |
| 52 | + CheckUtil.checkState(wallet.isPresent(), "Keychain not supported."); |
53 | 53 | wallet.get().storePassphrase(key, passphrase); |
54 | 54 | } |
55 | 55 |
|
56 | 56 | @Override |
57 | 57 | public char[] loadPassphrase(String key) throws KeychainAccessException { |
58 | | - Preconditions.checkState(wallet.isPresent(), "Keychain not supported."); |
| 58 | + CheckUtil.checkState(wallet.isPresent(), "Keychain not supported."); |
59 | 59 | return wallet.get().loadPassphrase(key); |
60 | 60 | } |
61 | 61 |
|
62 | 62 | @Override |
63 | 63 | public void deletePassphrase(String key) throws KeychainAccessException { |
64 | | - Preconditions.checkState(wallet.isPresent(), "Keychain not supported."); |
| 64 | + CheckUtil.checkState(wallet.isPresent(), "Keychain not supported."); |
65 | 65 | wallet.get().deletePassphrase(key); |
66 | 66 | } |
67 | 67 |
|
68 | 68 | @Override |
69 | 69 | public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException { |
70 | | - Preconditions.checkState(wallet.isPresent(), "Keychain not supported."); |
| 70 | + CheckUtil.checkState(wallet.isPresent(), "Keychain not supported."); |
71 | 71 | wallet.get().changePassphrase(key, passphrase); |
72 | 72 | } |
73 | 73 |
|
|
0 commit comments