Skip to content

chore: remove unused imports - #794

Merged
tanya732 merged 2 commits into
auth0:masterfrom
Zichen1028:chore/remove-unused-objectreader-import
Aug 17, 2026
Merged

chore: remove unused imports#794
tanya732 merged 2 commits into
auth0:masterfrom
Zichen1028:chore/remove-unused-objectreader-import

Conversation

@Zichen1028

Copy link
Copy Markdown
Contributor

Changes

Fixed #793

From #620 (9024318, Jan 2023) — this PR replaced a stored ObjectReader field with a fresh ObjectCodec obtained from the JsonParser at deserialize time, removing every usage of ObjectReader, but left the import behind in two places:

  • lib/src/main/java/com/auth0/jwt/impl/PayloadDeserializer.java (line 12): import com.fasterxml.jackson.databind.ObjectReader;
  • lib/src/test/java/com/auth0/jwt/impl/PayloadImplTest.java (line 6): import com.fasterxml.jackson.databind.ObjectReader;

From d8fe9a2 (Jun 2023) — this commit removed an assertThat(values, is(IsEmptyCollection.empty())) assertion but left the import:

  • lib/src/test/java/com/auth0/jwt/impl/PayloadDeserializerTest.java (line 14): import org.hamcrest.collection.IsEmptyCollection;

Two more, found via a repo-wide scan for the same pattern:

  • lib/src/test/java/com/auth0/jwt/JWTTest.java (line 15): import java.time.Duration;
  • lib/src/test/java/com/auth0/jwt/interfaces/VerificationTest.java (line 15): import static org.junit.Assert.assertThrows;

Validation

  • Ran ./gradlew build
  • Verified the project compiles successfully after removing unused imports.

Checklist

@Zichen1028
Zichen1028 requested a review from a team as a code owner August 3, 2026 13:07
@Zichen1028 Zichen1028 changed the title Chore/remove unused objectreader import chore: remove unused imports Aug 3, 2026
@tanya732

tanya732 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Hi @Zichen1028,

Thank you for your contribution!

Could you please sign your commits when you have a chance? In the meantime, I'll go ahead and review the PR.

Thanks!

@Zichen1028
Zichen1028 force-pushed the chore/remove-unused-objectreader-import branch from 65a4e1e to a486c76 Compare August 3, 2026 13:43
@Zichen1028

Copy link
Copy Markdown
Contributor Author

Hi @Zichen1028,

Thank you for your contribution!

Could you please sign your commits when you have a chance? In the meantime, I'll go ahead and review the PR.

Thanks!

Hi @tanya732 ,

Thank you for pointing this out!

This is actually my first public contribution, so I really appreciate your guidance. I’ve now signed my commits and updated the PR accordingly.

Thanks again for your help, and I appreciate you taking the time to review my contribution!

Best,
Simon

@tanya732 tanya732 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tanya732
tanya732 merged commit 4994fdf into auth0:master Aug 17, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unused imports left over from prior refactors (5 occurrences)

2 participants