swagger-api / swagger-api/swagger-codegen

[JAVA okhttp-gson; target=Android] Lint error - Calling new methods on older versions

Open
#5,280 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Java help wanted Issue: Bug
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

model/BenefitType.java:188: Call requires API level 19 (current min is 14): java.util.Objects#equals

return Objects.equals(this.value, benefitType.value) &&                                         
          Objects.equals(this.quantity, benefitType.quantity) &&
          Objects.equals(this.date, benefitType.date) &&
          Objects.equals(this.code, benefitType.code);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with model/BenefitType.java around line 188 and inspect how the generated Android model handles equality. Confirm the lint failure for the API 14 minimum, then verify that the equality checks no longer call APIs requiring level 19 and that lint passes for this model.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.