Skip to content

Commit

Permalink
NAS-2642: Testvariable
Browse files Browse the repository at this point in the history
  • Loading branch information
Knud Åge Hansen committed Sep 26, 2017
1 parent 437ee82 commit 7c77dca
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -738,19 +738,19 @@ public void frontier_list(HttpServletRequest req, HttpServletResponse resp, List
}

private Long extractPaginationInformation(ScriptResult scriptResult) {
Pattern pattern = Pattern.compile("-?\\d+");
//Matcher m = p.matcher("There are more than -2 and less than 12 numbers here");
Pattern pattern = Pattern.compile("\\d+");
if (scriptResult != null && scriptResult.script != null) {
if (scriptResult.script.htmlOutput != null) {
Matcher matcher = pattern.matcher(scriptResult.script.htmlOutput);
matcher.find();
return Long.parseLong(matcher.group(), 1);
String str = scriptResult.script.htmlOutput.substring(matcher.start(), matcher.end());
return Long.parseLong(scriptResult.script.htmlOutput.substring(matcher.start(), matcher.end()), 1);
}
else {
if (scriptResult.script.rawOutput != null) {
Matcher matcher = pattern.matcher(scriptResult.script.rawOutput);
matcher.find();
return Long.parseLong(matcher.group(), 1);
return Long.parseLong(scriptResult.script.rawOutput.substring(matcher.start(), matcher.end()), 1);
}
}
}
Expand Down

0 comments on commit 7c77dca

Please sign in to comment.