Deprecation warning in CheckLicense.java

The latest version of marketplace-makemecoffee-plugin/src/main/java/com/company/license/CheckLicense.java at master · JetBrains/marketplace-makemecoffee-plugin · GitHub shows a deprecation warning:

warning: [removal] getData(String) in DataContext has been deprecated and marked for removal
        return dataId -> switch (dataId) {
               ^
1 warning

The java code:

private static DataContext asDataContext(final String productCode, @Nullable String message) {
    return dataId -> switch (dataId) { // <- warning
        // the same code as registered in plugin.xml, 'product-descriptor' tag
        case "register.product-descriptor.code" -> productCode;

        // optional message to be shown in the registration dialog that appears
        case "register.message" -> message;
        default -> null;
    };
  }

Do you know how to fix that?

Thanks.

It seems that I should provide a SimpleDataContext, and find the DataKeys for register.product-descriptor.code and register.message?

I think I can return

SimpleDataContext.builder()
            .add(DataKey.create("register.product-descriptor.code"), productCode)
            .add(DataKey.create("register.message"), message)
            .build();

but how to (or, should I) handle the default case?