@@ -86,7 +86,7 @@ protected RepositoryFile getFileV3(String filePath, Integer projectId, String re
8686 * @throws GitLabApiException if any exception occurs
8787 */
8888 public RepositoryFile createFile (RepositoryFile file , Integer projectId , String branchName , String commitMessage ) throws GitLabApiException {
89- Form formData = file2form (file , branchName , commitMessage );
89+ Form formData = createForm (file , branchName , commitMessage );
9090 Response response ;
9191 if (isApiVersion (ApiVersion .V3 )) {
9292 response = post (Response .Status .CREATED , formData , "projects" , projectId , "repository" , "files" );
@@ -116,7 +116,7 @@ public RepositoryFile createFile(RepositoryFile file, Integer projectId, String
116116 * @throws GitLabApiException if any exception occurs
117117 */
118118 public RepositoryFile updateFile (RepositoryFile file , Integer projectId , String branchName , String commitMessage ) throws GitLabApiException {
119- Form formData = file2form (file , branchName , commitMessage );
119+ Form formData = createForm (file , branchName , commitMessage );
120120 Response response ;
121121 if (isApiVersion (ApiVersion .V3 )) {
122122 response = put (Response .Status .OK , formData .asMap (), "projects" , projectId , "repository" , "files" );
@@ -215,7 +215,7 @@ public InputStream getRawFile(Integer projectId, String commitOrBranchName, Stri
215215 return (response .readEntity (InputStream .class ));
216216 }
217217
218- private Form file2form (RepositoryFile file , String branchName , String commitMessage ) {
218+ private Form createForm (RepositoryFile file , String branchName , String commitMessage ) {
219219
220220 Form form = new Form ();
221221 if (isApiVersion (ApiVersion .V3 )) {
@@ -228,6 +228,6 @@ private Form file2form(RepositoryFile file, String branchName, String commitMess
228228 addFormParam (form , "encoding" , file .getEncoding (), false );
229229 addFormParam (form , "content" , file .getContent (), true );
230230 addFormParam (form , "commit_message" , commitMessage , true );
231- return form ;
231+ return ( form ) ;
232232 }
233233}
0 commit comments