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