This commit is contained in:
lucio 2024-02-22 12:22:41 +01:00
parent 50c646a8fb
commit a6552698f8
5 changed files with 20 additions and 7 deletions

View File

@ -10,5 +10,18 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@ -22,7 +22,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId> <artifactId>gcube-bom</artifactId>
<version>3.0.0</version> <version>3.0.1-SNAPSHOT</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

View File

@ -32,7 +32,7 @@ public final class Key {
private Key(String name, Query<?> query) { private Key(String name, Query<?> query) {
this.name = name; this.name = name;
this.query = query; this.query = query;
this.scope = SecretManagerProvider.instance.get().getContext(); this.scope = SecretManagerProvider.get().getContext();
} }
@Override @Override

View File

@ -97,7 +97,7 @@ public class AsyncProxyDelegate<S> implements ProxyDelegate<S> {
*/ */
public <V> Future<V> makeAsync(final Call<S, V> call, ExecutorService service) throws RejectedExecutionException { public <V> Future<V> makeAsync(final Call<S, V> call, ExecutorService service) throws RejectedExecutionException {
final Secret secret = SecretManagerProvider.instance.get(); final Secret secret = SecretManagerProvider.get();
// create task from call // create task from call
Callable<V> callTask = new Callable<V>() { Callable<V> callTask = new Callable<V>() {
@ -105,7 +105,7 @@ public class AsyncProxyDelegate<S> implements ProxyDelegate<S> {
@Override @Override
public V call() throws Exception { public V call() throws Exception {
SecretManagerProvider.instance.set(secret); SecretManagerProvider.set(secret);
return inner.make(call); return inner.make(call);
} }

View File

@ -106,7 +106,7 @@ public class AsyncDelegateTest {
public void asyncCallsExecuteInCallScope() throws Exception { public void asyncCallsExecuteInCallScope() throws Exception {
final String scope = "a/b/c"; final String scope = "a/b/c";
SecretManagerProvider.instance.set(new Secret() { SecretManagerProvider.set(new Secret() {
@Override @Override
@ -137,7 +137,7 @@ public class AsyncDelegateTest {
Answer<?> checkingScope= new Answer<Object>() { Answer<?> checkingScope= new Answer<Object>() {
@Override @Override
public Object answer(InvocationOnMock invocation) throws Throwable { public Object answer(InvocationOnMock invocation) throws Throwable {
assertEquals(scope,SecretManagerProvider.instance.get().getContext()); assertEquals(scope,SecretManagerProvider.get().getContext());
return value; return value;
} }
}; };
@ -171,7 +171,7 @@ public class AsyncDelegateTest {
public void asyncCallsAreInterrupted() throws Exception { public void asyncCallsAreInterrupted() throws Exception {
final String scope = "a/b/c"; final String scope = "a/b/c";
SecretManagerProvider.instance.set(new Secret() { SecretManagerProvider.set(new Secret() {
@Override @Override