Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-3523

DefaultSyncContext catches ClassCastException

    XMLWordPrintableJSON

Details

    Description

      the group and group-member sync code in the DefaultSyncContext twice catches ClassCastException and swallows exception situations, where a user is found, when actually a Group was expected.

      i would suggest to

      • explicitly test the assumption wrt ExternalIdentity being a group (instead of waiting for the exception)
      • make use of UserManager.getAuthorizable(String, Class) to explicitly retrieve a Group with a given ID, when this is actually expected. This method will throws an {{AuthorizableTypeException if there exists a User with that ID as thus properly raise the unexpected behavior instead of swallowing with a log-warning.

      Attachments

        1. OAK-3523_classcast_only.patch
          18 kB
          Angela Schreiber

        Issue Links

          Activity

            People

              angela Angela Schreiber
              angela Angela Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: