JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-3418

Allow Ruby naming conventions when implementing abstract methods of extended abstract Java classes

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: JRuby 1.1, JRuby 1.1.1, JRuby 1.1.2, JRuby 1.1.3, JRuby 1.1.4, JRuby 1.1.5, JRuby 1.1.6, JRuby 1.2, JRuby 1.x+
    • Fix Version/s: None
    • Component/s: Java Integration
    • Labels:
      None
    • Environment:
    • Number of attachments :
      0

      Description

      Extending / implementing abstract Java classes in JRuby does work fine
      for me.

      I see only a minor blemish: I can't use Ruby naming conventions to
      implement the abstract methods.

      E.g.

      • - - - - - - - - - - - - - - - - - - - - - - - - - - -
        class ProductTreeTableNode <
        org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
        #[...]
        def get_value_at(column_index)
        case column_index
        #[...]
        end
        #[...]
        end
      • - - - - - - - - - - - - - - - - - - - - - - - - - - -

      This results in

      Java::JavaLang::AbstractMethodError - java.lang.AbstractMethodError

      whereas the following implementation works fine:

      • - - - - - - - - - - - - - - - - - - - - - - - - - - -
        class ProductTreeTableNode <
        org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
        #[...]
        def getValueAt(column_index)
        case column_index
        #[...]
        end
        #[...]
        end
      • - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Activity

        Charles Oliver Nutter made changes -
        Field Original Value New Value
        Resolution Incomplete [ 4 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Charles Oliver Nutter made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Manfred Usselmann

            Dates

            • Created:
              Updated:
              Resolved: