Skip to content

[transactionwebhooks] Code generation: update services and models - #2071

Open
AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/transactionwebhooks
Open

AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/transactionwebhooks

Conversation

@AdyenAutomationBot

Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the transactionwebhooks service.

The commit history of this PR reflects the adyen-openapi commits that have been applied.

@AdyenAutomationBot
AdyenAutomationBot requested a review from a team as a code owner September 23, 2026 13:49

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Java SDK for transaction webhooks by adding a new networkVariant field to the IssuedCard model, including its enum definition, getter/setter, and builder methods. The review feedback recommends adding a null check to the NetworkVariantEnum.fromValue method to avoid logging false-positive warnings when the networkVariant field is null or missing.

Comment on lines +75 to +88
public static NetworkVariantEnum fromValue(String value) {
for (NetworkVariantEnum b : NetworkVariantEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
// handling unexpected value
LOG.warning(
"NetworkVariantEnum: unexpected enum value '"
+ value
+ "' - Supported values are "
+ Arrays.toString(NetworkVariantEnum.values()));
return null;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If the incoming JSON payload does not contain the networkVariant field or if it is explicitly set to null, Jackson may invoke this @JsonCreator method with a null argument. Currently, passing null will cause the method to loop through the enum values, fail to find a match, and log a warning: unexpected enum value 'null'. In high-throughput environments, this false-positive warning can flood application logs. Consider adding a null check at the beginning of the method to return null immediately without logging a warning.

    public static NetworkVariantEnum fromValue(String value) {
      if (value == null) {
        return null;
      }
      for (NetworkVariantEnum b : NetworkVariantEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      // handling unexpected value
      LOG.warning(
          "NetworkVariantEnum: unexpected enum value '"
              + value
              + "' - Supported values are "
              + Arrays.toString(NetworkVariantEnum.values()));
      return null;
    }

@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transactionwebhooks branch from c62bd5a to 0c75484 Compare September 23, 2026 15:26
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant