jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-3272

Hpricot uses deprecated and to-be-removed IntHashMap from JRuby

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: JRuby 1.6RC3
  • Component/s: Application Error, Intro
  • Labels:
    None

Description

Subject basically says it all. I wanted to clean house, and removed IntHashMap. But JRUBY-3270 shows a case that broke, because something (presumably AR-JDBC) was referencing IntHashMap. IntHashMap is not used by JRuby internally and has been deprecated for quite a while. We would like to delete it, so AR-JDBC should ideally stop using it now. Perhaps we'll be able to remove it NEXT year. Le sigh.

Patch is attached that reinstated IntHashMap. Reverse apply to remove it again.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    0001-JRUBY-3270-using-activerecord-to_xml-method-crash.patch
    29/Dec/08 3:01 PM
    9 kB
    Charles Oliver Nutter

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Stephen Bannasch added a comment - 31/Dec/08 12:47 PM

The problem is not with AR_JDBC.

Hpricot uses IntHashMap in it's JRuby implementation of fast_xs:

http://github.com/why/hpricot/tree/master/ext/fast_xs/FastXsService.java

FastXsService.java is compiled into fast_xs.jar and distributed with Hpricot.

Rails activesupport extends String with a XML escaped character version of #to_s called #to_xs and will use fast_xs if it is available:

http://github.com/rails/rails/tree/master/activesupport/lib/active_support/core_ext/string/xchar.rb

When hpricot is installed in a JRuby instance fast_xs is available.

Several of the AR tests exercise this method

FYI: nicksieger did the coding on FastXsService.java

http://caldersphere.net/hpricot-0.6.157-jruby-trunk.patch

Show
Stephen Bannasch added a comment - 31/Dec/08 12:47 PM The problem is not with AR_JDBC. Hpricot uses IntHashMap in it's JRuby implementation of fast_xs: http://github.com/why/hpricot/tree/master/ext/fast_xs/FastXsService.java FastXsService.java is compiled into fast_xs.jar and distributed with Hpricot. Rails activesupport extends String with a XML escaped character version of #to_s called #to_xs and will use fast_xs if it is available: http://github.com/rails/rails/tree/master/activesupport/lib/active_support/core_ext/string/xchar.rb When hpricot is installed in a JRuby instance fast_xs is available. Several of the AR tests exercise this method FYI: nicksieger did the coding on FastXsService.java http://caldersphere.net/hpricot-0.6.157-jruby-trunk.patch
Hide
Permalink
Thomas E Enebo added a comment - 16/Jan/09 4:42 PM

Changed this to reflect that it is for hpricot and not AR-JDBC

Show
Thomas E Enebo added a comment - 16/Jan/09 4:42 PM Changed this to reflect that it is for hpricot and not AR-JDBC
Hide
Permalink
Charles Oliver Nutter added a comment - 20/Jan/09 3:25 AM

Change title to spell Hpricot correctly

Show
Charles Oliver Nutter added a comment - 20/Jan/09 3:25 AM Change title to spell Hpricot correctly
Hide
Permalink
Charles Oliver Nutter added a comment - 05/Jan/10 3:39 PM

If we still use it...we could easily remove it.

Show
Charles Oliver Nutter added a comment - 05/Jan/10 3:39 PM If we still use it...we could easily remove it.
Hide
Permalink
Ola Bini added a comment - 11/Jan/10 3:57 AM

I have modified Hpricot to no longer use JRuby's IntHashMap, but of course we still need to have it in JRuby until a new version of Hpricot has been released. Leaving this bug open until that point.

Show
Ola Bini added a comment - 11/Jan/10 3:57 AM I have modified Hpricot to no longer use JRuby's IntHashMap, but of course we still need to have it in JRuby until a new version of Hpricot has been released. Leaving this bug open until that point.
Hide
Permalink
Thomas E Enebo added a comment - 01/Mar/11 11:44 AM

Hpricot no longer uses this class, but our profiler code does now. I assume we undeprecated it. wont-fixing.

Show
Thomas E Enebo added a comment - 01/Mar/11 11:44 AM Hpricot no longer uses this class, but our profiler code does now. I assume we undeprecated it. wont-fixing.

People

  • Assignee:
    Thomas E Enebo
    Reporter:
    Charles Oliver Nutter
Vote (0)
Watch (0)

Dates

  • Created:
    29/Dec/08 3:01 PM
    Updated:
    01/Mar/11 11:44 AM
    Resolved:
    01/Mar/11 11:44 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.