Skip to content

Commit

Permalink
Use Lookup to lookup DatabaseConnectionDetailsSPI
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Oct 8, 2024
1 parent f0c2ae4 commit f11a26a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.enso.database;

import java.util.ServiceLoader;
import org.enso.base.lookup.Lookup;
import org.enso.base.polyglot.EnsoMeta;
import org.graalvm.polyglot.Value;

public abstract class DatabaseConnectionDetailsSPI {
private static final ServiceLoader<DatabaseConnectionDetailsSPI> loader =
ServiceLoader.load(
DatabaseConnectionDetailsSPI.class, DatabaseConnectionDetailsSPI.class.getClassLoader());
private static final Lookup<DatabaseConnectionDetailsSPI> loader =
Lookup.lookup((l) -> ServiceLoader.load(l, DatabaseConnectionDetailsSPI.class));

/**
* Returns an array of pairs, where the first element is the user facing connection name and the
Expand Down
2 changes: 2 additions & 0 deletions test/AWS_Tests/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ license: MIT
author: [email protected]
maintainer: [email protected]
prefer-local-libraries: true
requires:
- Standard.Database

0 comments on commit f11a26a

Please sign in to comment.