Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1745

The AvailableRealmsCallback should not result in a NPE if there is no mechanism configuration.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 1.20.5.CR1
    • None
    • API / SPI
    • None

    Description

      The NPE is due to the following code: -

                      } else if (callback instanceof AvailableRealmsCallback) {
                          Collection<String> names = stateRef.get().getMechanismConfiguration().getMechanismRealmNames();
                          if (log.isTraceEnabled()) {
                              log.tracef("Handling AvailableRealmsCallback: realms = [%s]", String.join(", ", names));
                          }
                          if (! names.isEmpty()) {
                              ((AvailableRealmsCallback) callback).setRealmNames(names.toArray(new String[names.size()]));
                          }
                          handleOne(callbacks, idx + 1);
      

      If mechanism configuration is mandatory this should report an appropriate error, if not it should fallback to specifying an empty list.

      Attachments

        Activity

          People

            lvydra Lukas Vydra
            darran.lofthouse@redhat.com Darran Lofthouse
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: