@@ -913,7 +913,9 @@ public File getRepositoryArchive(
913
913
* false to compare using merge base (from…to)’.
914
914
* @return a CompareResults containing the results of the comparison
915
915
* @throws GitLabApiException if any exception occurs
916
+ * @deprecated use {@link #compare(Object, String, String, Long, Boolean)} instead
916
917
*/
918
+ @ Deprecated
917
919
public CompareResults compare (Object projectIdOrPath , String from , String to , Boolean straight )
918
920
throws GitLabApiException {
919
921
return compare (projectIdOrPath , from , to , null , straight );
@@ -928,9 +930,11 @@ public CompareResults compare(Object projectIdOrPath, String from, String to, Bo
928
930
* @param to the commit SHA or branch name
929
931
* @return a CompareResults containing the results of the comparison
930
932
* @throws GitLabApiException if any exception occurs
933
+ * @deprecated use {@link #compare(Object, String, String, Long, Boolean)} instead
931
934
*/
935
+ @ Deprecated
932
936
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 );
934
938
}
935
939
936
940
/**
@@ -947,19 +951,19 @@ public CompareResults compare(Object projectIdOrPath, String from, String to) th
947
951
* @throws GitLabApiException if any exception occurs
948
952
*/
949
953
public CompareResults compare (Object projectIdOrPath , String from , String to , Long fromProjectId , Boolean straight )
950
- throws GitLabApiException {
954
+ throws GitLabApiException {
951
955
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 );
956
960
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" );
963
967
return (response .readEntity (CompareResults .class ));
964
968
}
965
969
0 commit comments