code: public static String wrapCharArray(char[] c)
      {
          if (c == null)
              return null;
  
          String s = null;
  
          if (stringConstructor != null)
          {
              try
              {
                  s = stringConstructor.newInstance(0, c.length, c);
              } 
              catch (InvocationTargetException ite) {
                  // The underlying constructor failed. Unwrapping the exception.
                  Throwable cause = ite.getCause();
                  logger.error("Underlying string constructor threw an error: {}",
                      cause == null ? ite.getMessage() : cause.getMessage());
              }
              catch (Exception e)
              {
                  JVMStabilityInspector.inspectThrowable(e);
                  // Swallowing as we'll just use a copying constructor
              }
          }
          return s == null ? new String(c) : s;
      }
docs: Create a String from a char array with zero-copy (if available), using reflection to access a package-protected constructor of String.