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-2417

Make fields immutable where possible

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Miscellaneous
  • Labels:
    None

Description

There are a lot of places where instance or class variables could be made immutable.

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

Attachments

  1. Text File
    org.jruby.ext.patch
    19/Apr/08 4:55 PM
    6 kB
    Wayne Meissner
  2. Text File
    org.jruby.internal.patch
    19/Apr/08 4:55 PM
    16 kB
    Wayne Meissner
  3. Text File
    org.jruby.javasupport.patch
    19/Apr/08 4:54 PM
    4 kB
    Wayne Meissner
  4. Text File
    org.jruby.patch
    19/Apr/08 4:59 PM
    11 kB
    Wayne Meissner
  5. Text File
    org.jruby.runtime.patch
    19/Apr/08 4:54 PM
    10 kB
    Wayne Meissner
  6. Text File
    org.jruby.util.patch
    19/Apr/08 4:53 PM
    13 kB
    Wayne Meissner

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wayne Meissner added a comment - 19/Apr/08 4:53 PM

immutable field sweep for org.jruby.util

Show
Wayne Meissner added a comment - 19/Apr/08 4:53 PM immutable field sweep for org.jruby.util
Hide
Permalink
Charles Oliver Nutter added a comment - 30/Apr/08 9:59 AM

It seems like this is worth the effort, if only to help delineate fields we really don't want to be mutable. As far as I know there's still not really any perf benefit from final fields, other than static finals that can be folded away. But the immutability aspect could lead to cleaner, safer changes in the future.

Show
Charles Oliver Nutter added a comment - 30/Apr/08 9:59 AM It seems like this is worth the effort, if only to help delineate fields we really don't want to be mutable. As far as I know there's still not really any perf benefit from final fields, other than static finals that can be folded away. But the immutability aspect could lead to cleaner, safer changes in the future.
Hide
Permalink
Thomas E Enebo added a comment - 30/Apr/08 10:14 AM

It does also help for threading, but for most/all of these I do not think that would matter. This patch seems to be all about documenting the attribute itself.

Show
Thomas E Enebo added a comment - 30/Apr/08 10:14 AM It does also help for threading, but for most/all of these I do not think that would matter. This patch seems to be all about documenting the attribute itself.
Hide
Permalink
Wayne Meissner added a comment - 30/Apr/08 1:08 PM

These patches are just targetted at cleaning up the code a bit - no operational changes. Hopefully having all the 'easily' immutable fields made so, will make it easier to spot & make changes that do affect things (especially wrt threading and data visibility).

Show
Wayne Meissner added a comment - 30/Apr/08 1:08 PM These patches are just targetted at cleaning up the code a bit - no operational changes. Hopefully having all the 'easily' immutable fields made so, will make it easier to spot & make changes that do affect things (especially wrt threading and data visibility).
Hide
Permalink
Thomas E Enebo added a comment - 04/Feb/09 1:40 PM

I am not against marking final fields where reasonable, but Wayne is a comitter now and can do this piecemeal without needing an issue for this (plus I bet these patches are stale).

Show
Thomas E Enebo added a comment - 04/Feb/09 1:40 PM I am not against marking final fields where reasonable, but Wayne is a comitter now and can do this piecemeal without needing an issue for this (plus I bet these patches are stale).

People

  • Assignee:
    Thomas E Enebo
    Reporter:
    Wayne Meissner
Vote (0)
Watch (1)

Dates

  • Created:
    19/Apr/08 4:52 PM
    Updated:
    27/Oct/09 1:48 PM
    Resolved:
    04/Feb/09 1:40 PM
  • 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.