Skip to content

Commit

Permalink
Issue #114. improved Javadoc for setObjectsPerPage() method in Redmin…
Browse files Browse the repository at this point in the history
…eManager.java
  • Loading branch information
alexeyOnGitHub committed Mar 22, 2015
1 parent 8d8458c commit f8380d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 3 additions & 9 deletions src/main/java/com/taskadapter/redmineapi/RedmineManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,9 @@ public CustomFieldManager getCustomFieldManager() {

/**
* This number of objects (tasks, projects, users) will be requested from Redmine server in 1 request.
*/
public int getObjectsPerPage() {
return transport.getObjectsPerPage();
}

// TODO add test

/**
* This number of objects (tasks, projects, users) will be requested from Redmine server in 1 request.
* Note that if you set objects per page to be, say, 10, and you have 20 objects on the server,
* then issueManager.getIssues() will still return ALL 20 objects at once even though the library
* will perform 2 requests to the server (to load 10 objects each time).
*/
public void setObjectsPerPage(int pageSize) {
transport.setObjectsPerPage(pageSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ public void updatingIssueWithNonExistingIdGivesNotFoundException() throws Redmin
public void testGetIssuesPaging() throws RedmineException {
// create 27 issues. default page size is 25.
createIssues(issueManager, projectId, 27);
// mgr.setObjectsPerPage(5); <-- does not work now
List<Issue> issues = issueManager.getIssues(projectKey, null);
assertTrue(issues.size() > 26);

Expand Down

0 comments on commit f8380d8

Please sign in to comment.