Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing squid: common-java:DuplicatedBlocks Source files should not have any duplicated blocks #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,7 @@ public FileInfo parse(final FileInfoParameter parameter) {
.filter(f -> f.getPath().equals(parameter.getFilePath())).collect(Collectors.toList());
if (null != fileIfs && fileIfs.size() == 1) {
final FileListData fileListData = fileIfs.get(0);
fileInfo.setDate(fileListData.getDate());
fileInfo.setFhash(fileListData.getFhash());
fileInfo.setFileType(fileListData.getFileType());
fileInfo.setHasThumb(fileListData.getHasThumb());
fileInfo.setIsDir(fileListData.getIsDir());
fileInfo.setIsFav(fileListData.getIsFav());
fileInfo.setFmtime(fileListData.getFmtime());
fileInfo.setMtime(fileListData.getMtime());
fileInfo.setNid(fileListData.getNid());
fileInfo.setOriName(fileListData.getOriName());
fileInfo.setOriSize(fileListData.getOriSize());
fileInfo.setPath(fileListData.getPath());
fileInfo.setPic(fileListData.getPic());
fileInfo.setPreview(fileListData.getPreview());
fileInfo.setScid(fileListData.getScid());
fileInfo.setSize(fileListData.getSize());
fileInfo.setThumb(fileListData.getThumb());
fileInfo.setFileListData(fileListData);
return fileInfo;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.dounine.clouddisk360.parser;

import com.dounine.clouddisk360.annotation.Parse;
import com.dounine.clouddisk360.parser.deserializer.BaseConst;
import com.dounine.clouddisk360.parser.deserializer.login.Login;
import com.dounine.clouddisk360.parser.deserializer.login.LoginConst;
import com.dounine.clouddisk360.parser.deserializer.login.LoginUserToken;
Expand Down Expand Up @@ -43,8 +44,8 @@ public HttpPost initRequest(final UserCheckLoginParameter userCheckLoginParamete
}
final HttpPost request = new HttpPost(CONST.URI_PATH);
final List<NameValuePair> data = new ArrayList<>();
data.add(new BasicNameValuePair(CONST.QID_NAME, login.getQid()));
data.add(new BasicNameValuePair(CONST.METHOD_KEY, CONST.METHOD_VAL));
data.add(new BasicNameValuePair(UserCheckLoginConst.QID_NAME, login.getQid()));
data.add(new BasicNameValuePair(UserCheckLoginConst.METHOD_KEY, UserCheckLoginConst.METHOD_VAL));
data.add(new BasicNameValuePair(CONST.AJAX_KEY, CONST.AJAX_VAL));
data.add(new BasicNameValuePair("t", TimeUtil.getTimeLenth(13)));
request.setConfig(RequestConfig.custom().setCookieSpec(CookieSpecs.NETSCAPE).build());
Expand All @@ -57,7 +58,7 @@ public UserCheckLogin execute(final HttpPost request) {
httpClient = HttpClients.custom()
.setConnectionManager(PoolingHttpClientConnection.getInstalce())
.addInterceptorLast(requestInterceptor)
.setDefaultCookieStore(cookieStoreUT.readCookieStoreForDisk(CONST.BASE_COOKIES_VALUES))
.setDefaultCookieStore(cookieStoreUT.readCookieStoreForDisk(BaseConst.BASE_COOKIES_VALUES))
.build();
try {
return httpClient.execute(request, responseHandler, this.httpClientContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.dounine.clouddisk360.annotation.DependResult;
import com.dounine.clouddisk360.annotation.Dependency;
import com.dounine.clouddisk360.annotation.Parse;
import com.dounine.clouddisk360.parser.deserializer.BaseConst;
import com.dounine.clouddisk360.parser.deserializer.login.LoginUserToken;
import com.dounine.clouddisk360.parser.deserializer.user.info.*;
import com.dounine.clouddisk360.pool.PoolingHttpClientConnection;
Expand Down Expand Up @@ -43,11 +44,11 @@ public HttpGet initRequest(final UserInfoParameter userInfoParameter) {
uriBuilder.addParameter(CONST.SRC_KEY, CONST.SRC_VAL);
uriBuilder.addParameter(CONST.FROM_KEY, CONST.FROM_VAL);
uriBuilder.addParameter(CONST.CHARSET_KEY, CONST.CHARSET_VAL);
uriBuilder.addParameter(CONST.METHOD_KEY, CONST.METHOD_VAL);
uriBuilder.addParameter(UserInfoConst.METHOD_KEY, UserInfoConst.METHOD_VAL);
uriBuilder.addParameter(CONST.REQUESTSCEMA_KEY, CONST.REQUESTSCEMA_VAL);
uriBuilder.addParameter(CONST.O_KEY, CONST.O_VAL);
uriBuilder.addParameter(CONST.SHOW_NAME_FLAG_NAME, CONST.SHOW_NAME_FLAG_VALUE);
uriBuilder.addParameter(CONST.HEAD_TYPE_NAME, CONST.HEAD_TYPE_VAL);
uriBuilder.addParameter(UserInfoConst.SHOW_NAME_FLAG_NAME, UserInfoConst.SHOW_NAME_FLAG_VALUE);
uriBuilder.addParameter(UserInfoConst.HEAD_TYPE_NAME, UserInfoConst.HEAD_TYPE_VAL);
uriBuilder.addParameter("-", TimeUtil.getTimeLenth(13));
final HttpGet request = new HttpGet(uriBuilder.build());
request.setConfig(RequestConfig.custom().setCookieSpec(CookieSpecs.NETSCAPE).build());
Expand All @@ -63,7 +64,7 @@ public UserInfo execute(final HttpGet request) {
httpClient = HttpClients.custom()
.setConnectionManager(PoolingHttpClientConnection.getInstalce())
.addInterceptorLast(requestInterceptor)
.setDefaultCookieStore(cookieStoreUT.readCookieStoreForDisk(CONST.BASE_COOKIES_VALUES))
.setDefaultCookieStore(cookieStoreUT.readCookieStoreForDisk(BaseConst.BASE_COOKIES_VALUES))
.build();
try {
return httpClient.execute(request, responseHandler, this.httpClientContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,163 +2,21 @@

import com.alibaba.fastjson.JSON;
import com.dounine.clouddisk360.parser.deserializer.BaseDes;
import com.dounine.clouddisk360.parser.deserializer.file.list.FileListData;

public class FileInfo extends BaseDes {

private String oriName;
private String path;
private String nid;
private String date;
private Integer isDir;
private String isFav;
private String mtime;
private String fmtime;
private Long oriSize;
private String size;
private String scid;
private String preview;
private String hasThumb;
private String thumb;
private String fhash;
private String pic;
private String fileType;

public String getOriName() {
return oriName;
}

public void setOriName(String oriName) {
this.oriName = oriName;
}

public String getPath() {
return path;
}

public void setPath(String path) {
this.path = path;
}

public String getNid() {
return nid;
}

public void setNid(String nid) {
this.nid = nid;
}

public String getDate() {
return date;
}

public void setDate(String date) {
this.date = date;
}

public Integer getIsDir() {
return isDir;
}

public void setIsDir(Integer isDir) {
this.isDir = isDir;
}

public String getIsFav() {
return isFav;
}

public void setIsFav(String isFav) {
this.isFav = isFav;
}

public String getMtime() {
return mtime;
}

public void setMtime(String mtime) {
this.mtime = mtime;
}

public String getFmtime() {
return fmtime;
}

public void setFmtime(String fmtime) {
this.fmtime = fmtime;
}

public Long getOriSize() {
return oriSize;
private FileListData fileListData;

public FileInfo(){
fileListData=new FileListData();
}

public void setOriSize(Long oriSize) {
this.oriSize = oriSize;
public FileListData getFileListData() {
return fileListData;
}

public String getSize() {
return size;
public void setFileListData(FileListData fileListData) {
this.fileListData = fileListData;
}

public void setSize(String size) {
this.size = size;
}

public String getScid() {
return scid;
}

public void setScid(String scid) {
this.scid = scid;
}

public String getPreview() {
return preview;
}

public void setPreview(String preview) {
this.preview = preview;
}

public String getHasThumb() {
return hasThumb;
}

public void setHasThumb(String hasThumb) {
this.hasThumb = hasThumb;
}

public String getThumb() {
return thumb;
}

public void setThumb(String thumb) {
this.thumb = thumb;
}

public String getFhash() {
return fhash;
}

public void setFhash(String fhash) {
this.fhash = fhash;
}

public String getPic() {
return pic;
}

public void setPic(String pic) {
this.pic = pic;
}

public String getFileType() {
return fileType;
}

public void setFileType(String fileType) {
this.fileType = fileType;
}

@Override
public String toString() {
return JSON.toJSONString(this, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void testParse() {
fileListParameter.setOrder(Order.DESC);
fileListParameter.setPage(0);
fileListParameter.setPage_size(300);
fileListParameter.setPath(fileListParameter.ROOT_PATH);
fileListParameter.setPath(FileListParameter.ROOT_PATH);
final FileList fileList = fileListParser.parse(fileListParameter);
LOGGER.info(fileList.toString());
}
Expand Down