docs: public static String subjectToString(final Subject subject) {
  
          final String result;
  
          if (subject == null) {
              
              result = "null";
              
          } else {
              
              final StringBuffer buffer = startToString(subject);
              addFieldToString(buffer, "principals", subject.getPrincipals());
              endToString(buffer);
              result = buffer.toString();
              
          }
  
          return result;
  
      }