Skip to content

Commit

Permalink
Replace useless parameter in DatabaseHelper constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
bivashy committed Apr 3, 2024
1 parent 75edc7b commit d4f7b05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/src/main/java/me/mastercapexd/auth/BaseAuthPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.concurrent.Executors;
import java.util.stream.IntStream;

import com.alessiodp.libby.classloader.IsolatedClassLoader;
import com.bivashy.auth.api.AuthPlugin;
import com.bivashy.auth.api.AuthPluginProvider;
import com.bivashy.auth.api.account.AccountFactory;
Expand Down Expand Up @@ -156,7 +157,7 @@ private void initializeBasic() {
this.accountFactory = new AuthAccountFactory();
this.linkTypeProvider = BaseLinkTypeProvider.allLinks();
// TODO: Replace this with IsolatedDatabaseHelperFactory
this.accountDatabase = new AuthAccountDatabaseProxy(new DatabaseHelper(this, getClass().getClassLoader()));
this.accountDatabase = new AuthAccountDatabaseProxy(new DatabaseHelper(this, new IsolatedClassLoader()));
this.loginManagement = new BaseLoginManagement(this);

this.registerAuthenticationSteps();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.util.concurrent.Executors;
import java.util.function.Consumer;

import com.alessiodp.libby.classloader.IsolatedClassLoader;
import com.bivashy.auth.api.AuthPlugin;
import com.bivashy.auth.api.config.database.DatabaseSettings;
import com.bivashy.auth.api.config.database.schema.SchemaSettings;
Expand Down Expand Up @@ -63,7 +62,7 @@ public DatabaseHelper(AuthPlugin plugin, ClassLoader classLoader) {
String cacheDriverCheckSum = HashUtils.getFileCheckSum(cacheDriverFile, HashUtils.getMD5());
if (!cacheDriverFile.exists() || cacheDriverCheckSum != null && !DownloadUtil.checkSum(HashUtils.mapToMd5URL(downloadUrl), cacheDriverCheckSum))
DownloadUtil.downloadFile(downloadUrl, cacheDriverFile);
DriverUtil.loadDriver(cacheDriverFile, new IsolatedClassLoader());
DriverUtil.loadDriver(cacheDriverFile, classLoader);

DataPersisterManager.registerDataPersisters(new CryptoProviderPersister());

Expand Down

0 comments on commit d4f7b05

Please sign in to comment.