Camel
  1. Camel
  2. CAMEL-3692

badly named getter methods for type "Boolean"

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: None
    • Labels:
      None

      Description

      Since changing loads of types from "boolean" -> "Boolean", we left many of the getter methods using "isFoo" rather than changing them to the Java Beans compliant "getFoo". Breaking the Java Beans specification for naming properties can cause issues with libraries and tools; since the property is no longer introspectable or readable in any introspection based tool (of which there are loads around).

      e.g. go to camel-core/src/main/java/org/apache/camel/model/ then in your IDE search for "Boolean is". Those isFoo methods returning Boolean should be returned isFoo.

      For completeness we could also generate an isFoo for backwards compatibility that looks like...

      public boolean isFoo()

      { return foo != null && foo.booleanValue(); }

        Activity

        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Claus Ibsen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Claus Ibsen added a comment -

        trunk: 1073239.

        Show
        Claus Ibsen added a comment - trunk: 1073239.
        Claus Ibsen committed 1073239 (16 files)
        Reviews: none

        CAMEL-3692: Fixed Boolean getter/setter being java bean spec compliant. Make it easier to use introspection in toolling etc.

        Claus Ibsen <davsclaus@apache.org> committed d30b5aeb67993d0d7718550c043af23fa461fb45 (16 files)
        Reviews: none

        CAMEL-3692: Fixed Boolean getter/setter being java bean spec compliant. Make it easier to use introspection in toolling etc.
        git-svn-id: https://svn.apache.org/repos/asf/camel/trunk@1073239 13f79535-47bb-0310-9956-ffa450edef68

        Claus Ibsen made changes -
        Issue Type New Feature [ 2 ] Improvement [ 4 ]
        Claus Ibsen made changes -
        Field Original Value New Value
        Assignee Claus Ibsen [ davsclaus ]
        james strachan created issue -

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            james strachan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development