Development attention in the project team

Now the project is developed by multiple people. I myself encountered a problem during the development process. I will record it here for everyone to learn from;

The specific error reason is indicated by code + comment:

 

public List<Object> method(
			List<Long> idList) throws SolrServerException {
		List<Object> resultList = new ArrayList<Object>();// getDataFromDB...此处省略
		if (idList.size() != idList.size()) {
			// Process the reviews that do not have the number of replies searched,
			// Although the returned result resultList is correct, the reviewIdList was accidentally changed in the processResultList method,
			// And the caller is still using idList after calling the method , resulting in an exception in the data finally returned to the page
			// This kind of problem needs to be paid attention to when developing projects with multiple people
			 processResultList(idList, resultList);
		}
		return resultList;
	}

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326426412&siteId=291194637