This commit is contained in:
Lucio Lelii 2016-10-04 13:01:08 +00:00
parent e8c2aa92f1
commit 5ac0bf67d1
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@ public class Utils {
public static int getInfrastructureHashFromToken(String token, String defaultInfrastructureToUse) {
if (token==null) throw new RuntimeException("token required for this method");
else if (token.matches(NEW_TOKEN_REGEXPR)){
if (token.matches(NEW_TOKEN_REGEXPR)){
String hashCodeAsString = token.substring(token.lastIndexOf("-")+1, token.length());
return Integer.parseInt(hashCodeAsString);
} else if (token.matches(OLD_TOKEN_REGEXPR))