镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Drop use of deprecated APIs from JRuby #346

Description

@headius

In jruby/jruby#9299 I attempted to remove all APIs deprecated prior to the release of JRuby 9.4.0.0, knowing that there would be some third-party libraries that still accessed them. jruby-openssl was a cuplrit for several:

  • Generated method objects from jruby-openssl still use old-style constructors that don't accept name and a few "pre" methods for framing. This is due to the generation being run on an older version of JRuby. jruby/jruby@2dd94ed
  • An older BlockingTask API for interrupting blocking operations, which has been replaced in the last few major JRuby releases. jruby/jruby@c086c7a
  • Deprecated RaiseException constructors. jruby/jruby@d13daa5
  • RubyHash#visitAll which has been replaced by versions that pass more state through (to reduce the need for a Lambda state object). jruby/jruby@fa1305f

We should try to eliminate these uses while still considering how far back we want to support old JRuby releases.

Activity

  1. raye-deng commented on Mar 18, 2026

    @raye-deng

    🔍 Code Quality Analysis

    Hi! I noticed this issue and ran an automated code quality scan on jruby/jruby-openssl.

    📊 Scan Results

    • Overall Score: 35/100 (Grade: F)
    • Total Issues Found: 820

    🔴 Top Issues

    1. WARNING: java.util.Date is largely deprecated in favor of java.time API
      • File: main/java/org/jruby/ext/openssl/OCSPBasicResponse.java:340
    2. WARNING: java.util.Date is largely deprecated in favor of java.time API
      • File: main/java/org/jruby/ext/openssl/OCSPBasicResponse.java:340
    3. WARNING: java.util.Date is largely deprecated in favor of java.time API
      • File: main/java/org/jruby/ext/openssl/OCSPBasicResponse.java:340
    4. WARNING: java.util.Date is largely deprecated in favor of java.time API
      • File: main/java/org/jruby/ext/openssl/OCSPSingleResponse.java:272
    5. WARNING: java.util.Date is largely deprecated in favor of java.time API
      • File: main/java/org/jruby/ext/openssl/OCSPSingleResponse.java:273

    📋 Additional Issues Found

    Besides the primary issues, I also found:

    • 344 Context Coherence issues
    • 454 Implementation issues

    These may impact overall code quality and maintainability.

    💡 Recommendation: Consider addressing these issues alongside the original problem to improve overall code health.

    🛠️ Recommended Actions

    1. For Code Freshness issues:

      • Review the detailed report for specific guidance
      • Address high-severity issues first
      • Run another scan after fixes to verify
    2. Get detailed HTML report:

      npx @opencodereview/cli scan jruby/jruby-openssl --format html --output report.html
    3. Fix systematically:

      • Review the HTML report for detailed code snippets
      • Address issues by severity (high → medium → low)
      • Re-run scan after fixes to verify improvements

    This is an automated scan from Open Code Review — a free, open-source code quality tool. If this isn't helpful, feel free to ignore or delete this comment.

    Scanned on 2026-03-12

  2. added this to the 0.20.0 milestone on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions