Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
206dba0b
Commit
206dba0b
authored
Mar 21, 2014
by
Greg Messner
Browse files
Changed how the HTTP status is determined.
parent
0c2c14e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/messners/gitlab/api/GitLabApiException.java
View file @
206dba0b
...
...
@@ -9,6 +9,8 @@ public class GitLabApiException extends Exception {
private
static
final
long
serialVersionUID
=
1L
;
private
StatusType
statusInfo
;
private
int
httpStatus
;
private
String
message
;
/**
...
...
@@ -20,6 +22,7 @@ public class GitLabApiException extends Exception {
super
();
statusInfo
=
response
.
getStatusInfo
();
httpStatus
=
response
.
getStatus
();
if
(
response
.
hasEntity
())
{
try
{
...
...
@@ -67,6 +70,6 @@ public class GitLabApiException extends Exception {
* @return
*/
public
final
int
getHttpStatus
()
{
return
(
statusInfo
!=
null
?
statusInfo
.
getStatusCode
()
:
0
);
return
(
httpStatus
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment