Skip to content

Commit

Permalink
Fix json parse
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Jul 17, 2024
1 parent 36e9670 commit 66d6203
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,14 @@ private OCCapability parseResponse(String response) throws JSONException {
}

if (respFiles.has(FORBIDDEN_FILENAMES)) {
boolean capabilityValue = respFiles.getBoolean(FORBIDDEN_FILENAMES);
CapabilityBooleanType result = CapabilityBooleanType.fromBooleanValue(capabilityValue);
JSONArray forbiddenFilenames = respFiles.getJSONArray(FORBIDDEN_FILENAMES);
CapabilityBooleanType result = CapabilityBooleanType.fromBooleanValue(forbiddenFilenames.length() > 0);
capability.setForbiddenFilenames(result);
}

if (respFiles.has(FORBIDDEN_FILENAME_EXTENSIONS)) {
boolean capabilityValue = respFiles.getBoolean(FORBIDDEN_FILENAME_EXTENSIONS);
CapabilityBooleanType result = CapabilityBooleanType.fromBooleanValue(capabilityValue);
JSONArray forbiddenFilenamesExtensions = respFiles.getJSONArray(FORBIDDEN_FILENAME_EXTENSIONS);
CapabilityBooleanType result = CapabilityBooleanType.fromBooleanValue(forbiddenFilenamesExtensions.length() > 0);
capability.setForbiddenFilenameExtension(result);
}
// endregion
Expand Down

0 comments on commit 66d6203

Please sign in to comment.