Skip to content

Commit

Permalink
fix(MessageInteractionMetadataObject.java): replaced (String) value w…
Browse files Browse the repository at this point in the history
…ith String.valueOf(value) when determining the value of an authorizing_integration_owners array object

this was causing a cast exception when that value was an integer
  • Loading branch information
seailz committed Apr 15, 2024
1 parent ee89d56 commit 4f901ce
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ public JSONObject compile() {
}

public static MessageInteractionMetadataObject decompile(JSONObject object) {
System.out.println(object);

HashMap<IntegrationType, String> authorizingIntegrationOwners = new HashMap<>();

if (object.has("authorizing_integration_owners"))
object.getJSONObject("authorizing_integration_owners").toMap()
.forEach((key, value) -> authorizingIntegrationOwners.put(IntegrationType.fromCode(Integer.parseInt(key)), (String) value));
.forEach((key, value) -> authorizingIntegrationOwners.put(IntegrationType.fromCode(Integer.parseInt(key)), String.valueOf(value)));


return new MessageInteractionMetadataObject(
Expand Down

0 comments on commit 4f901ce

Please sign in to comment.