Skip to content

fix(java): use correct Long literals in OAuth token supplier for Optional<Long> expires_in fields#12504

Merged
fern-support merged 6 commits intomainfrom
jsklan/fix-java-long-expires
Feb 18, 2026
Merged

fix(java): use correct Long literals in OAuth token supplier for Optional<Long> expires_in fields#12504
fern-support merged 6 commits intomainfrom
jsklan/fix-java-long-expires

Conversation

@fern-support
Copy link
Collaborator

Summary

  • Fix Java generator to use correct Long literals (3600L) instead of int literals (3600) for Optional expires_in fields in OAuth token suppliers
  • Refactor isLongType method to use PoetTypeNameMapper for robust type resolution
  • Add support for detecting Long types within Optional<T> parameterized types
  • Simplify optional expires_in handling logic by removing redundant container checks

Test plan

  • Generator builds successfully
  • Generated code uses 3600L for Optional<Long> expires_in fields
  • Generated code uses 3600 for other numeric types
  • Existing OAuth token supplier functionality preserved

🤖 Generated with Claude Code

jsklan and others added 2 commits February 17, 2026 17:08
…onal<Long> expires_in fields

- Refactor isLongType method to use PoetTypeNameMapper for robust type resolution
- Add support for detecting Long types within Optional<T> parameterized types
- Generate 3600L (long literal) instead of 3600 (int literal) for Optional<Long> fields
- Simplify optional expires_in handling logic by removing redundant container checks
- Remove unused PrimitiveTypeV1 import

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Updates versions.yml with changelog entry for Long literal fix in OAuth token suppliers.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI
  • Postman

How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR.

…workflow

- Add filter: tree:0 to checkout action to prevent authentication issues
- This resolves the 'could not read Username for https://github.com' error
- The combination of sparse-checkout with default blob filtering was causing
  Git to attempt fetching specific objects that required authentication
@fern-support fern-support merged commit 6a71f5a into main Feb 18, 2026
121 checks passed
@fern-support fern-support deleted the jsklan/fix-java-long-expires branch February 18, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments