Skip to content

Fix JRuby deprecation warnings in RubyDigest#131

Merged
olleolleolle merged 1 commit into
ruby:masterfrom
olleolleolle:avoid-deprecation-warnings-for-jruby
Jun 18, 2026
Merged

Fix JRuby deprecation warnings in RubyDigest#131
olleolleolle merged 1 commit into
ruby:masterfrom
olleolleolle:avoid-deprecation-warnings-for-jruby

Conversation

@olleolleolle

@olleolleolle olleolleolle commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Replace deprecated JRuby API calls with their ThreadContext-aware equivalents introduced in JRuby 10.

Methods that previously resolved context internally now require an explicit ThreadContext argument.

Also adds serialVersionUID fields to DigestClass and DigestBase, and marks the non-serializable MessageDigest field as transient.

This fixes the whole list of deprecation warnings.

Replace deprecated JRuby API calls with their ThreadContext-aware equivalents introduced in JRuby 10. The pattern throughout is uniform: methods that previously resolved context internally now require an explicit ThreadContext argument. Also adds serialVersionUID fields to DigestClass and DigestBase, and marks the non-serializable MessageDigest field as transient.
@olleolleolle olleolleolle marked this pull request as ready for review June 18, 2026 07:45
@olleolleolle olleolleolle requested a review from knu as a code owner June 18, 2026 07:45
@olleolleolle olleolleolle requested a review from headius June 18, 2026 08:20

@headius headius left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good!

@headius

headius commented Jun 18, 2026

Copy link
Copy Markdown

For anyone else who might wonder: these methods were added in 10.0 so they are not available in 9.4... but 9.4 did not use a the gem for digest anyway.

@olleolleolle olleolleolle merged commit 5b9e087 into ruby:master Jun 18, 2026
44 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.

2 participants