Bug Fixing #20457. Moved to 1.0.0-SNAPSHOT

This commit is contained in:
Francesco Mangiacrapa 2021-01-18 12:57:44 +01:00
parent 713935b854
commit 32925c7954
3 changed files with 16 additions and 7 deletions

View File

@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.0-SNAPSHOT] - 2021-01-18
#### Bug Fixes
[#20457] Fixed incident
## [v0.3.0] - 2020-07-27
[#19677] Migrated to git/jenkins

View File

@ -12,7 +12,7 @@
<groupId>org.gcube.common</groupId>
<artifactId>workspace-task-executor-library</artifactId>
<version>0.3.0</version>
<version>1.0.0-SNAPSHOT</version>
<name>workspace-task-executor-library</name>
<description>The workspace-task-executor-library is a library to execute data miner's algorithms from workspace</description>

View File

@ -16,19 +16,16 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The Class WsUtil.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Sep 6, 2019
* Jan 18, 2021
*/
public class WsUtil {
private static Logger logger = LoggerFactory.getLogger(WsUtil.class);
private Workspace theWorkspace;
/**
* Gets the workspace from storage hub.
@ -65,13 +62,18 @@ public class WsUtil {
*/
public Workspace getWorkspace() throws Exception{
if(theWorkspace==null) {
/*if(theWorkspace==null) {
checkInitParameters();
String scope = ScopeProvider.instance.get();
String token = SecurityTokenProvider.instance.get();
theWorkspace = getWorkspaceFromStorageHub(scope, token);
}
return theWorkspace;
return theWorkspace;*/
String scope = ScopeProvider.instance.get();
String token = SecurityTokenProvider.instance.get();
if(token!=null)
logger.debug("Instancing "+StorageHubWrapper.class.getSimpleName()+" with token: "+token.substring(0,token.length()-10)+"[MASKED-TOKEN]");
return getWorkspaceFromStorageHub(scope, token);
}