Skip to content

Backward Compatibility With okhttp3 3.14.x #104

Description

@ausykaso

Problem:

  • If the voucherify-java-sdk is used together with the current Contentful Java SDK there's a version clash regarding okhttp3: voucherify depends on version 4.2.0 and contentful on 3.12.12.
  • At compile time, the build tool (in our project gradle) negotiates okhttp3 version 3.14.9 as the most suitable version to be used for both.
  • The project using both, voucherify and contentful builds without errors or warnings but then fails at runtime in VoucherifyClient.java:245 with an invalid method call exception (access to a private member).
  • Using voucherify 8.1.0 (latest version before switching to okhttp3 4.2.0) works but fails reading vouchers from the predefined voucherify 30 day trial environment -> versions after 8.1.0 seems to introduce breaking changes, error message:
    "io.voucherify.client.error.VoucherifyError: Cannot deserialize value of type  io.voucherify.client.model.voucher.DiscountType from String "FIXED": not one of the values accepted for Enum class: [AMOUNT, UNIT, PERCENT]"
    

Expected behaviour:

  • Either a project using the voucherify SDK 9.x or higher must not compile if an incompatible version of one of the voucherify dependencies has been negotiated by the build tool
  • Or voucherify should be backwards compatible (to a defined version?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions