Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Java, eliminate unsafe casts #338

Merged
merged 16 commits into from
Dec 18, 2023
Merged

Java, eliminate unsafe casts #338

merged 16 commits into from
Dec 18, 2023

Conversation

spacether
Copy link
Contributor

@spacether spacether commented Dec 16, 2023

Java, eliminate unsafe casts in schema classes

  • castToAllowedTypes now returns List and Map
  • this is because when getNewInstance gets a schema for a json path, that can be any schema, and one needs to take in that unknown typed data, and produce a final list/map instance type or primitive type. Collection types are unknown in getNewInstance so include that wildcard output type in castToAllowedTypes

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    mvn clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/python*.
    For Windows users, please run the script in Git BASH.

@spacether spacether force-pushed the feat_java_adds_cast_type branch from 36c8534 to f42deb1 Compare December 16, 2023 00:35
@spacether spacether changed the title Java, adds cast type Java, reduce unsafe casts Dec 16, 2023
@spacether spacether force-pushed the feat_java_adds_cast_type branch from 25d44a5 to f42deb1 Compare December 16, 2023 19:21
@spacether spacether changed the title Java, reduce unsafe casts Java, eliminate unsafe casts Dec 18, 2023
@spacether spacether merged commit 5804717 into master Dec 18, 2023
@spacether spacether deleted the feat_java_adds_cast_type branch December 18, 2023 20:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant