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

Ea 3712 zoho sync addon #19

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open

Conversation

Luthien-in-edhil
Copy link
Member

private static final String ACCOUNTS = "Accounts";


public String ZohoBulkCreateJob(String moduleAPIName) throws Exception {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method can be divided into smaller parts


} else if (actionResponse instanceof APIException) {
APIException exception = (APIException) actionResponse;
LOG.error("Status: " + exception.getStatus().getValue());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar logging present in the else if block below which can be extracted in method

private static final Logger LOG = Logger.getLogger(ZohoBatchDownload.class);
private static final String COMPLETED = "COMPLETED";

public String downloadResult(Long jobId) throws Exception {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method can be divided into smaller units to reduce the complexity and also multiple if blocks can be combined .

return "";
}

public static String unZipFile(String pathToZipFile) throws Exception {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method can be divided into smaller units of each task and reduce the complexity

return "";
}
if (response.isExpected()) {
ResponseHandler responseHandler = response.getObject();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well we can have code extracted in smaller method to reduce complexity and to segregate tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants