git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-client@177322 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2bf6b03a8a
commit
894bb1b78c
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>authorization-client</artifactId>
|
<artifactId>authorization-client</artifactId>
|
||||||
<version>2.0.3-SNAPSHOT</version>
|
<version>2.0.4-SNAPSHOT</version>
|
||||||
<name>authorization service client library</name>
|
<name>authorization service client library</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
|
|
@ -15,9 +15,7 @@ public class Utils {
|
||||||
|
|
||||||
protected static int getInfrastructureHashfromContext(String context) {
|
protected static int getInfrastructureHashfromContext(String context) {
|
||||||
try{
|
try{
|
||||||
String infrastructure = context;
|
String infrastructure = context.replaceAll("^/?([^/]*)/?.*", "$1");
|
||||||
if (context.startsWith("/"))
|
|
||||||
infrastructure = context.substring(1);
|
|
||||||
|
|
||||||
int hashcode= infrastructure.hashCode();
|
int hashcode= infrastructure.hashCode();
|
||||||
return Math.abs(hashcode);
|
return Math.abs(hashcode);
|
||||||
|
|
Loading…
Reference in New Issue