Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-2176

RemoteCrowdDirectory.updateUser() can throw IllegalArgumentException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.2, 2.2 Iteration 3
    • None
    • REST

    Description

      In Confluence, we get the following exception when trying to modify user information on a POSIX (read-only) LDAP server via Crowd:

      java.lang.IllegalArgumentException: POSIX support is currently read-only
      	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.handleCommonExceptions(RestCrowdClient.java:1081)
      	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.updateUser(RestCrowdClient.java:128)
      	at com.atlassian.crowd.directory.RemoteCrowdDirectory.updateUser(RemoteCrowdDirectory.java:139)
      

      As I see it, this method should throw OperationFailedException according to the RemoteDirectory and CrowdClient API documentation.

      I think the fundamental problem here is the handleCommonExceptions() method in RestCrowdClient, which seems to throw IllegalArgumentException in quite a number of cases. None of the methods on the CrowdClient interface are documented as throwing IAE, so this exception therefore bubbles up to the unsuspecting client code and leads to unhandled exceptions.

      Attachments

        Issue Links

          Activity

            People

              psongsiritat Piyawoot Songsiritat [Atlassian]
              matt@atlassian.com Matt Ryall
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h