Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,17 @@ public class ApiClient {
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,17 @@ public <T> T deserialize(Response response, Type returnType) throws ApiException
}
try {
if (isJsonMime(contentType)) {
return JSON.deserialize(respBody.byteStream(), returnType);
if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
return null;
}
// Use String-based deserialize for String return type with fallback
return JSON.deserialize(respBodyString, returnType);
} else {
// Use InputStream-based deserialize which supports responses > 2GB
return JSON.deserialize(respBody.byteStream(), returnType);
}
} else if (returnType.equals(String.class)) {
String respBodyString = respBody.string();
if (respBodyString.isEmpty()) {
Expand Down
Loading