docs: public static void verifyChainCoherency(ChainData chainData) throws IncoherentChainException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "verifyChainCoherency");
          }
          ChannelData[] channelDataArray = chainData.getChannelList();
          // Verify there are multiple channels in this chain.
          if (channelDataArray.length > 1) {
              ChannelFrameworkImpl fw = (ChannelFrameworkImpl) ChannelFrameworkFactory.getChannelFramework();
              ChannelFactoryData current = null;
              ChannelFactoryData next = null;
              Class<?>[] currentDevClasses = null;
              Class<?> nextAppClass = null;
              try {
                  current = fw.findOrCreateChannelFactoryData(channelDataArray[0].getFactoryType());
              } catch (ChannelFactoryException e) {
                  // No FFDC Needed
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Found invalid channel factory of type " + channelDataArray[0].getFactoryType().getName());
                  }
                  throw new IncoherentChainException("Invalid channel factory");
              }
              // Iterate the channels and verify coherency between them.
              for (int i = 1; i < channelDataArray.length; i++) {
                  currentDevClasses = current.getDeviceInterface();
                  try {
                      next = fw.findOrCreateChannelFactoryData(channelDataArray[i].getFactoryType());
                  } catch (ChannelFactoryException e) {
                      // No FFDC Needed
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Found invalid channel factory of type " + channelDataArray[i].getFactoryType().getName());
                      }
                      throw new IncoherentChainException("Invalid channel factory");
                  }
                  nextAppClass = next.getApplicationInterface();
                  // Check for nulls or incompatibility.
                  if ((null == currentDevClasses) || (null == nextAppClass)) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Found null interface classes between two channel factories: " + current.getFactory().getName() + ", " + next.getFactory().getName());
                      }
                      throw new IncoherentChainException("Found null interface classes between two channel factories: " + current.getFactory().getName() + ", "
                                                         + next.getFactory().getName());
                  }
                  // Handle polymorphism
                  boolean foundMatch = false;
                  for (int j = 0; j < currentDevClasses.length; j++) {
                      if (nextAppClass.isAssignableFrom(currentDevClasses[j])) {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "Found compatible class: " + nextAppClass + " " + currentDevClasses[j]);
                          }
                          foundMatch = true;
                          break;
                      }
                  }
                  if (!foundMatch) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Found incoherency between two channel factories: " + current.getFactory().getName() + ", " + next.getFactory().getName());
                      }
                      throw new IncoherentChainException("Found incoherency between two channel factories: " + current.getFactory().getName() + ", " + next.getFactory().getName());
                  }
                  current = next;
              }
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "verifyChainCoherency");
          }
      }