@@ -913,7 +913,9 @@ public File getRepositoryArchive(
913913 * false to compare using merge base (from…to)’.
914914 * @return a CompareResults containing the results of the comparison
915915 * @throws GitLabApiException if any exception occurs
916+ * @deprecated use {@link #compare(Object, String, String, Long, Boolean)} instead
916917 */
918+ @ Deprecated
917919 public CompareResults compare (Object projectIdOrPath , String from , String to , Boolean straight )
918920 throws GitLabApiException {
919921 return compare (projectIdOrPath , from , to , null , straight );
@@ -928,9 +930,11 @@ public CompareResults compare(Object projectIdOrPath, String from, String to, Bo
928930 * @param to the commit SHA or branch name
929931 * @return a CompareResults containing the results of the comparison
930932 * @throws GitLabApiException if any exception occurs
933+ * @deprecated use {@link #compare(Object, String, String, Long, Boolean)} instead
931934 */
935+ @ Deprecated
932936 public CompareResults compare (Object projectIdOrPath , String from , String to ) throws GitLabApiException {
933- return ( compare (projectIdOrPath , from , to , false ) );
937+ return compare (projectIdOrPath , from , to , false );
934938 }
935939
936940 /**
@@ -947,19 +951,19 @@ public CompareResults compare(Object projectIdOrPath, String from, String to) th
947951 * @throws GitLabApiException if any exception occurs
948952 */
949953 public CompareResults compare (Object projectIdOrPath , String from , String to , Long fromProjectId , Boolean straight )
950- throws GitLabApiException {
954+ throws GitLabApiException {
951955 GitLabApiForm formData = new GitLabApiForm ()
952- .withParam ("from" , from , true )
953- .withParam ("to" , to , true )
954- .withParam ("straight" , straight )
955- .withParam ("from_project_id" , fromProjectId );
956+ .withParam ("from" , from , true )
957+ .withParam ("to" , to , true )
958+ .withParam ("straight" , straight )
959+ .withParam ("from_project_id" , fromProjectId );
956960 Response response = get (
957- Response .Status .OK ,
958- formData .asMap (),
959- "projects" ,
960- getProjectIdOrPath (projectIdOrPath ),
961- "repository" ,
962- "compare" );
961+ Response .Status .OK ,
962+ formData .asMap (),
963+ "projects" ,
964+ getProjectIdOrPath (projectIdOrPath ),
965+ "repository" ,
966+ "compare" );
963967 return (response .readEntity (CompareResults .class ));
964968 }
965969
0 commit comments