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

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

      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.

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

                Created:
                Updated: