docs: protected static String getFirstApplicationStackString() {
          // Don't do trace in this method as it would only confuse the issue
          // to see a full stack trace.
          String val = null;
  
          Exception e = new Exception();
          StackTraceElement[] ste = e.getStackTrace();
  
          String jmsImplPackageName = JmsErrorUtils.class.getPackage().getName();
  
          // The elements of the stack start at 0 with an entry for this method, and
          // get closer to the application as the indices increase. We are looking for
          // the first entry that isn't in the jms.impl package.
  
          // Start at index 1, because sometimes the Throwable constructor gets into
          // the stack trace too. We know that there is at least two lines in the stack
          // trace because this method has been called by someone else in the JMS component.
          for (int i = 1; i < ste.length; i++) {
  
              // Class name includes the package name.
              String recordClassName = ste[i].getClassName();
              if (!recordClassName.startsWith(jmsImplPackageName)) {
                  // We have found the first non-JMS entry.
                  val = ste[i].toString();
                  // Leave the loop immediately.
                  break;
              }
          }
  
          return val;
      }