remove synchronize in Page #411
parent
3a796b9413
commit
ad69963005
|
@ -107,7 +107,6 @@ public class Page {
|
|||
* @param requests requests
|
||||
*/
|
||||
public void addTargetRequests(List<String> requests) {
|
||||
synchronized (targetRequests) {
|
||||
for (String s : requests) {
|
||||
if (StringUtils.isBlank(s) || s.equals("#") || s.startsWith("javascript:")) {
|
||||
continue;
|
||||
|
@ -116,7 +115,6 @@ public class Page {
|
|||
targetRequests.add(new Request(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add urls to fetch
|
||||
|
@ -125,7 +123,6 @@ public class Page {
|
|||
* @param priority priority
|
||||
*/
|
||||
public void addTargetRequests(List<String> requests, long priority) {
|
||||
synchronized (targetRequests) {
|
||||
for (String s : requests) {
|
||||
if (StringUtils.isBlank(s) || s.equals("#") || s.startsWith("javascript:")) {
|
||||
continue;
|
||||
|
@ -134,7 +131,6 @@ public class Page {
|
|||
targetRequests.add(new Request(s).setPriority(priority));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add url to fetch
|
||||
|
@ -145,11 +141,9 @@ public class Page {
|
|||
if (StringUtils.isBlank(requestString) || requestString.equals("#")) {
|
||||
return;
|
||||
}
|
||||
synchronized (targetRequests) {
|
||||
requestString = UrlUtils.canonicalizeUrl(requestString, url.toString());
|
||||
targetRequests.add(new Request(requestString));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add requests to fetch
|
||||
|
@ -157,10 +151,8 @@ public class Page {
|
|||
* @param request request
|
||||
*/
|
||||
public void addTargetRequest(Request request) {
|
||||
synchronized (targetRequests) {
|
||||
targetRequests.add(request);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get url of current page
|
||||
|
|
Loading…
Reference in New Issue