From e588a7ded6fae3b033e1a59a4c24d1e1a6799747 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 21 Dec 2022 02:11:47 +0300 Subject: sape: adopt records --- src/main/java/ru/sape/SapePageLinks.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/ru') diff --git a/src/main/java/ru/sape/SapePageLinks.java b/src/main/java/ru/sape/SapePageLinks.java index 285d38f6..2bd5464e 100644 --- a/src/main/java/ru/sape/SapePageLinks.java +++ b/src/main/java/ru/sape/SapePageLinks.java @@ -35,15 +35,15 @@ public class SapePageLinks { String req = StringUtils.isNotEmpty(request.getQuery()) ? request.getPath() + "?" + request.getQuery() : request.getPath(); - linkDelimiter = site.getDelimiter(); + linkDelimiter = site.delimiter(); this.showCode = sapeUser.equals(sapeCookie); if (showCode) { - pageLinks = Collections.singletonList(site.getCode()); + pageLinks = Collections.singletonList(site.code()); } else { - pageLinks = site.getPages().stream().filter(page -> page.getUri().equals(req)) - .flatMap(page -> page.getLinks().stream()).collect(Collectors.toList()); + pageLinks = site.pages().stream().filter(page -> page.uri().equals(req)) + .flatMap(page -> page.links().stream()).collect(Collectors.toList()); } } -- cgit v1.2.3