Skip to content

Commit

Permalink
bumped API
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Apr 13, 2022
1 parent bca05df commit 1c23d06
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<project.jdk.version>17</project.jdk.version>

<!-- runtime dependencies -->
<api.version>1.1.0-beta2</api.version>
<api.version>1.1.0-rc1</api.version>
<secret-service.version>1.7.0</secret-service.version>
<kdewallet.version>1.2.6</kdewallet.version>
<guava.version>31.1-jre</guava.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ public boolean isLocked() {
return wallet.map(ConnectedWallet::isLocked).orElse(false);
}

@Override
@Deprecated
public void storePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
storePassphrase(key, null, passphrase);
}

@Override
public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
Expand All @@ -69,12 +63,6 @@ public void deletePassphrase(String key) throws KeychainAccessException {
wallet.get().deletePassphrase(key);
}

@Override
@Deprecated
public void changePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
changePassphrase(key, null, passphrase);
}

@Override
public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,14 @@ public boolean isLocked() {
}
}

@Override
@Deprecated
public void storePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
storePassphrase(key, null, passphrase);
}

@Override
public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
try (SimpleCollection keyring = new SimpleCollection()) {
List<String> list = keyring.getItems(createAttributes(key));
if (list == null || list.isEmpty()) {
keyring.createItem(LABEL_FOR_SECRET_IN_KEYRING, passphrase, createAttributes(key));
} else {
changePassphrase(key, passphrase);
changePassphrase(key, displayName, passphrase);
}
} catch (IOException | SecurityException e) {
throw new KeychainAccessException("Storing password failed.", e);
Expand Down Expand Up @@ -81,12 +75,6 @@ public void deletePassphrase(String key) throws KeychainAccessException {
}
}

@Override
@Deprecated
public void changePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
changePassphrase(key, null, passphrase);
}

@Override
public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
try (SimpleCollection keyring = new SimpleCollection()) {
Expand Down

0 comments on commit 1c23d06

Please sign in to comment.