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

custom LdapEndpoint: inconsistent type for pageSize leads to NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.20.2, 3.8.0
    • 3.9.0
    • camel-ldap
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: