Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16356

custom LdapEndpoint: inconsistent type for pageSize leads to NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.20.2, 3.8.0
    • Fix Version/s: 3.9.0
    • Component/s: camel-ldap
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The getter/setter for pageSize have inconsistent/incorrect types:

      public void setPageSize(Integer pageSize) {
              this.pageSize = pageSize;    
      }
      public int getPageSize() {
              return pageSize;    
      } 

      If you want to create a custom ldap component and you subclass the endpoint you have to use the getter which leads to an nullpointer exception:

      public Producer createProducer() throws Exception {
       return new MyLdapProducer(this, remainingLdap, getBase(), toSearchControlScope(getScope()), ->getPageSize()<-, getReturnedAttributes());
       } 

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cgiera Christoph Giera
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: