@@ -57,7 +57,11 @@ public KeepassProxyAccess() {
5757 connection .setCredentials (loadCredentials ());
5858 }
5959
60- // TODO Add Javadoc
60+ /**
61+ * Loads the @see org.purejava.Credentials from disc, if available, to setup this library
62+ * so that it can be used to send requests to and receive requests from a KeePassXC database.
63+ * @return An Optional of the Credentials read from disc in case they are available, an empty Optional otherwise.
64+ */
6165 private Optional <Credentials > loadCredentials () {
6266 try (FileInputStream fileIs = new FileInputStream (fileLocation );
6367 ObjectInputStream objIs = new ObjectInputStream (fileIs )) {
@@ -70,8 +74,11 @@ private Optional<Credentials> loadCredentials() {
7074 }
7175
7276
73-
74- // TODO Add Javadoc
77+ /**
78+ * Saves @see org.purejava.Credentials in a delayed background thread to disc, as this is a time consuming
79+ * operation that might fail.
80+ * @param credentials An Optional of the Credentials to be saved.
81+ */
7582 private void scheduleSave (Optional <Credentials > credentials ) {
7683 if (credentials .isEmpty ()) {
7784 log .debug ("Credentials are not present and won't be saved" );
@@ -85,7 +92,10 @@ private void scheduleSave(Optional<Credentials> credentials) {
8592 }
8693 }
8794
88- // TODO Add Javadoc
95+ /**
96+ * Saves @see org.purejava.Credentials to disc.
97+ * @param credentials An Optional of the Credentials to be saved.
98+ */
8999 private void saveCredentials (Optional <Credentials > credentials ) {
90100 log .debug ("Attempting to save credentials" );
91101 try {
0 commit comments