File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
util/src/main/java/io/kubernetes/client/util/generic Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 15
15
import io .kubernetes .client .common .KubernetesType ;
16
16
import io .kubernetes .client .openapi .ApiException ;
17
17
import io .kubernetes .client .openapi .models .V1Status ;
18
+ import java .net .HttpURLConnection ;
18
19
19
20
public class KubernetesApiResponse <DataType extends KubernetesType > {
20
21
@@ -25,7 +26,7 @@ public class KubernetesApiResponse<DataType extends KubernetesType> {
25
26
public KubernetesApiResponse (DataType object ) {
26
27
this .object = object ;
27
28
this .status = null ;
28
- this .httpStatusCode = - 1 ;
29
+ this .httpStatusCode = HttpURLConnection . HTTP_OK ; // 200
29
30
}
30
31
31
32
public KubernetesApiResponse (V1Status status , int httpStatusCode ) {
@@ -47,7 +48,7 @@ public int getHttpStatusCode() {
47
48
}
48
49
49
50
public boolean isSuccess () {
50
- return this .httpStatusCode < 400 ;
51
+ return this .httpStatusCode < HttpURLConnection . HTTP_BAD_REQUEST ; // 400
51
52
}
52
53
53
54
/**
You can’t perform that action at this time.
0 commit comments