Skip to content

Commit

Permalink
FIkset ny nullpointer i metrikk
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaslundmark committed Oct 20, 2023
1 parent 4ff8f4b commit b940732
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ public Avtale hent(@PathVariable("avtaleId") UUID id, @CookieValue("innlogget-pa
try {
URL refererUrl = new URL(referer);
String queryStr = refererUrl.getQuery();
String[] params = queryStr.split("&");
for(String param : params) {
String[] paramValues = param.split("=");
if(paramValues[0].equals("page") && paramValues.length > 1) {
summary.record(Double.valueOf(paramValues[1]));
if(StringUtils.isNotBlank(queryStr)) {
String[] params = queryStr.split("&");
for(String param : params) {
String[] paramValues = param.split("=");
if(paramValues[0].equals("page") && paramValues.length > 1) {
summary.record(Double.valueOf(paramValues[1]));
}
}
}
} catch (MalformedURLException e) {}
Expand Down

0 comments on commit b940732

Please sign in to comment.