Skip to content

Commit c9f2b18

Browse files
committed
Use var instead of explicit declaration
1 parent 2d4a12f commit c9f2b18

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/purejava/integrations/keychain/KeePassXCAccess.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ public char[] loadPassphrase(String vault) throws KeychainAccessException {
5454
throw new KeychainAccessException("Loading of the passphrase failed");
5555
}
5656
vault = URL_SCHEME + vault;
57-
Map<String, Object> answer = proxy.getLogins(vault, null, false, List.of(proxy.exportConnection()));
57+
var answer = proxy.getLogins(vault, null, false, List.of(proxy.exportConnection()));
5858
if (answer.isEmpty() || null == answer.get("entries")) {
5959
throw new KeychainAccessException("Loading of the passphrase failed");
6060
}
61-
List<Object> array = (ArrayList<Object>) answer.get("entries");
62-
Map<String, Object> credentials = (HashMap<String, Object>) array.get(0);
61+
var array = (ArrayList<Object>) answer.get("entries");
62+
var credentials = (HashMap<String, Object>) array.get(0);
6363
if (credentials.get("password") != null) {
64-
String password = (String) credentials.get("password");
64+
var password = (String) credentials.get("password");
6565
return password.toCharArray();
6666
} else {
6767
throw new KeychainAccessException("Loading of the passphrase failed");

0 commit comments

Comments
 (0)