Skip to content

Update dependencies/API to support deprecated java8 functionality. #3

Description

@bjconlan

Artifact: webull-openai-java-sdk
Version: 1.1.14

When using the library with a Java 8+ a number of issues need to be resolved to allow the library to run due to deprecated features in newer Java implementations.

JAXB deprecation (usage of javax.xml.bind.DatatypeConverter)

Signer implementations (com.webull.openapi.core.auth.signer.{HmacSHA1,HmacSHA256,SHA256withRSA}Signer.java) make use of a deprecated JAXB API feature for outputting the base64.

Replace the existing DatatypeConverter.printBase64Binary(signData) calls with Base64.getEncoder().encodeToString(signData). This ensures that Java 8 and above will work without having new runtimes explicitly include the legacy JAXB dependencies.

Java annotations deprication (usage of javax.annotation.Generated)

GRPC generators (com.webull.openapi.trade.events.internal.proto.EventServiceGrpc.java & com.webull.openapi.data.internal.grpc.proto.QuoteGrpc.java) use said annotations.

Conditionally import the javax.annotation:javax.annotation-api:1.3.2 dependency when using java 9+.

NB. I've taken the most prominent solutions to each of these cases (optionally you could also include the JAXB api/runtime dependencies inline with the javax.annotation apis if desired)

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