Skip to content

Commit

Permalink
getUnknownTokenString was throwing an error if token key found but no…
Browse files Browse the repository at this point in the history
… value
  • Loading branch information
louietyj committed Nov 6, 2016
1 parent 22368e4 commit c00b823
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ private static String extractKeyOrValue(Map<String, String[]> parsedResult, bool
public static String getUnknownTokenString(Map<String, String[]> parsedResult) {
String[] defaultToken = parsedResult.get("default");

if (defaultToken == null || defaultToken.length < 2 || defaultToken[1].length() <= 0) {
if (defaultToken != null && defaultToken[1] != null && defaultToken[1].length() > 0) {
return defaultToken[1];
} else {
return null;
}

return defaultToken[1];
}
}

0 comments on commit c00b823

Please sign in to comment.