code: private void handleRotatedLogs(@Nonnull final String gcLogFileLocation, Container result) {
          File gcLogFile = new File(gcLogFileLocation);
  
          // always add .* in the end because this is where the numbering is going to happen
          String regex = gcLogFile.getName().replaceAll("%[pt]", ".*") + ".*";
          final Pattern gcLogFilesPattern = Pattern.compile(regex);
  
          File parentDirectory = gcLogFile.getParentFile();
  
          if (parentDirectory == null || !parentDirectory.exists()) {
              LOGGER.warning("[Support Bundle] " + parentDirectory + " does not exist, cannot collect gc logging files.");
              return;
          }
  
          File[] gcLogs = parentDirectory.listFiles(new FilenameFilter() {
              @Override
              public boolean accept(File dir, String name) {
                  return gcLogFilesPattern.matcher(name).matches();
              }
          });
          if (gcLogs == null || gcLogs.length == 0) {
              LOGGER.warning("No GC logging files found, although the VM argument was found. This is probably a bug.");
              return;
          }
  
          LOGGER.finest("Found " + gcLogs.length + " matching files in " + parentDirectory.getAbsolutePath());
          for (File gcLog : gcLogs) {
              LOGGER.finest("Adding '" + gcLog.getName() + "' file");
              result.add(new FileContent(GCLOGS_BUNDLE_ROOT + "{0}", new String[]{gcLog.getName()}, gcLog));
          }
      }
docs: Two cases:
  <ul>
  <li>The file name contains <code>%t</code> or <code>%p</code> somewhere in the middle:
  then we are simply going to replace those by <code>.*</code> to find associated logs and match files by regex.
  This will match GC logs from the current JVM execution, or possibly previous ones.</li>
  <li>or that feature is not used, then we simply match by "starts with"</li>
  </ul>
  
  @param gcLogFileLocation the specified value after <code>-Xloggc:</code>
  @param result            the container where to add the found logs, if any.
  @see https://bugs.openjdk.java.net/browse/JDK-7164841