diff options
Diffstat (limited to 'src/main/java/ru')
-rw-r--r-- | src/main/java/ru/sape/Sape.java | 3 | ||||
-rw-r--r-- | src/main/java/ru/sape/SapePageLinks.java | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/ru/sape/Sape.java b/src/main/java/ru/sape/Sape.java index bf9755509..83a183310 100644 --- a/src/main/java/ru/sape/Sape.java +++ b/src/main/java/ru/sape/Sape.java @@ -35,10 +35,9 @@ public class Sape { "/code.php?user=" + sapeUser + "&host=" + host, "SAPE_Client PHP", socketTimeout, cacheLifeTime); } - public boolean debug = false; public Optional<SapePageLinks> getPageLinks(URI requestUri, String cookie) { return sapePageLinkConnection.getData() - .map(site -> new SapePageLinks(site, sapeUser, requestUri, cookie, debug)); + .map(site -> new SapePageLinks(site, sapeUser, requestUri, cookie)); } } diff --git a/src/main/java/ru/sape/SapePageLinks.java b/src/main/java/ru/sape/SapePageLinks.java index 6cbfa42fe..285d38f6a 100644 --- a/src/main/java/ru/sape/SapePageLinks.java +++ b/src/main/java/ru/sape/SapePageLinks.java @@ -31,13 +31,13 @@ public class SapePageLinks { private final String linkDelimiter; private final List<String> pageLinks; - public SapePageLinks(Site site, String sapeUser, URI request, String sapeCookie, boolean showPageCode) { + public SapePageLinks(Site site, String sapeUser, URI request, String sapeCookie) { String req = StringUtils.isNotEmpty(request.getQuery()) ? request.getPath() + "?" + request.getQuery() : request.getPath(); linkDelimiter = site.getDelimiter(); - this.showCode = showPageCode || sapeUser.equals(sapeCookie); + this.showCode = sapeUser.equals(sapeCookie); if (showCode) { pageLinks = Collections.singletonList(site.getCode()); |