@@ -96,7 +96,7 @@ public Stream<WikiPage> getPagesStream(Object projectIdOrPath) throws GitLabApiE
96
96
* @param perPage the number of wiki-pages per page
97
97
* @return a list of pages in project's wiki for the specified range
98
98
* @throws GitLabApiException if any exception occurs
99
- * @deprecated Will be removed in a future release, use {@link #getPages(Object, boolean , int)}
99
+ * @deprecated Will be removed in a future release, use {@link #getPages(Object, Boolean , int)}
100
100
*/
101
101
public List <WikiPage > getPages (Object projectIdOrPath , int page , int perPage ) throws GitLabApiException {
102
102
Response response = get (
@@ -118,7 +118,7 @@ public List<WikiPage> getPages(Object projectIdOrPath, int page, int perPage) th
118
118
* @return a List of pages in project's wiki for the specified range
119
119
* @throws GitLabApiException if any exception occurs
120
120
*/
121
- public List <WikiPage > getPages (Object projectIdOrPath , boolean withContent ) throws GitLabApiException {
121
+ public List <WikiPage > getPages (Object projectIdOrPath , Boolean withContent ) throws GitLabApiException {
122
122
return (getPages (projectIdOrPath , withContent , getDefaultPerPage ()).all ());
123
123
}
124
124
@@ -133,9 +133,12 @@ public List<WikiPage> getPages(Object projectIdOrPath, boolean withContent) thro
133
133
* @return a Pager of pages in project's wiki for the specified range
134
134
* @throws GitLabApiException if any exception occurs
135
135
*/
136
- public Pager <WikiPage > getPages (Object projectIdOrPath , boolean withContent , int itemsPerPage )
136
+ public Pager <WikiPage > getPages (Object projectIdOrPath , Boolean withContent , int itemsPerPage )
137
137
throws GitLabApiException {
138
- GitLabApiForm formData = new GitLabApiForm ().withParam ("with_content" , (withContent ? 1 : 0 ));
138
+ GitLabApiForm formData = new GitLabApiForm ();
139
+ if (withContent != null ) {
140
+ formData .withParam ("with_content" , (withContent .booleanValue () ? 1 : 0 ));
141
+ }
139
142
return (new Pager <WikiPage >(
140
143
this ,
141
144
WikiPage .class ,
@@ -156,7 +159,7 @@ public Pager<WikiPage> getPages(Object projectIdOrPath, boolean withContent, int
156
159
* @return a Stream of pages in project's wiki for the specified range
157
160
* @throws GitLabApiException if any exception occurs
158
161
*/
159
- public Stream <WikiPage > getPagesStream (Object projectIdOrPath , boolean withContent ) throws GitLabApiException {
162
+ public Stream <WikiPage > getPagesStream (Object projectIdOrPath , Boolean withContent ) throws GitLabApiException {
160
163
return (getPages (projectIdOrPath , withContent , getDefaultPerPage ()).stream ());
161
164
}
162
165
0 commit comments