docs: @FFDCIgnore({ AnnotationTargetsVisitor.VisitEnded.class, ArrayIndexOutOfBoundsException.class })
      protected boolean scanClass(String classSourceName,
                                  String className,
                                  InputStream inputStream,
                                  ScanPolicy scanPolicy) {
  
          Object[] logParms;
          if (tc.isDebugEnabled()) {
              logParms = new Object[] { getHashText(), className, null };
              Tr.debug(tc, MessageFormat.format("[ {0} ] ENTER class [ {1} ]", logParms));
          } else {
              logParms = null;
          }
  
          AnnotationTargetsVisitor useVisitor = getVisitor();
  
          useVisitor.i_setClassSourceName(internClassSourceName(classSourceName));
  
          // For non-seed scans, tell the visitor to only process the
          // class relationship information.  Skip class annotations and
          // and class contents (fields and methods).
  
          useVisitor.setScanPolicy(scanPolicy);
          useVisitor.setExternalName(className);
  
          boolean failedScan;
  
          try {
              // Both IOException and Exception have been seen;
              // in particular ArrayindexOutOfBoundsException for a non-valid class.
  
              ClassReader classReader = new ClassReader(inputStream); // throws IOException, Exception
  
              classReader.accept(getVisitor(),
                                 (ClassReader.SKIP_FRAMES | ClassReader.SKIP_DEBUG | ClassReader.SKIP_CODE));
              // 'accept' throws IOException, VisitEnded, Exception
  
              failedScan = false;
  
              if (logParms != null) {
                  logParms[2] = "Success";
              }
  
          } catch (IOException e) {
              failedScan = true;
  
              // String eMsg = "[ " + getHashText() + " ] Class [ " + className + " ] Exception creating reader";
              Tr.warning(tc, "ANNO_TARGETS_FAILED_TO_CREATE_READER", className); // CWWKC0049W
  
          } catch (AnnotationTargetsVisitor.VisitEnded e) {
              // 'VisitEnded' is used both for a normal flow control for
              // skipping detailed scan data (which is not a failed scan)
              // and for other cases, such as duplicate scan requests
              // and name mismatch cases, which are failures.
  
              failedScan = !e.isDetailCase();
  
              if (logParms != null) {
                  logParms[2] = "Halted: " + e.getEndCase();
              }
  
          } catch (ArrayIndexOutOfBoundsException e) {
              Tr.info(tc, "ANNO_TARGETS_CORRUPT_CLASS", className, classSourceName);
              failedScan = true;
  
          } catch (Exception e) {
              // String eMsg = "[ " + getHashText() + " ] Visit failure [ " + className + " ]";
              // CWWKC0044W: An exception occurred while scanning class and annotation data.
              Tr.warning(tc, "ANNO_TARGETS_SCAN_EXCEPTION", e);
  
              if (logParms != null) {
                  logParms[2] = "Exception: " + e.getMessage();
              }
  
              failedScan = true;
          }
  
          if (logParms != null) {
              Tr.debug(tc, MessageFormat.format("[ {0} ] RETURN From class [ {1} ]: [ {2} ]", logParms));
          }
  
          return (!failedScan);
      }