docs: public static long getLastModified(URL resourceURL) {
          final String protocol = resourceURL.getProtocol();
          switch (protocol) {
              case "jar":
                  try {
                      final JarURLConnection jarConnection = (JarURLConnection) resourceURL.openConnection();
                      final JarEntry entry = jarConnection.getJarEntry();
                      return entry.getTime();
                  } catch (IOException ignored) {
                      return 0;
                  }
              case "file":
                  URLConnection connection = null;
                  try {
                      connection = resourceURL.openConnection();
                      return connection.getLastModified();
                  } catch (IOException ignored) {
                      return 0;
                  } finally {
                      if (connection != null) {
                          try {
                              connection.getInputStream().close();
                          } catch (IOException ignored) {
                              // do nothing.
                          }
                      }
                  }
              default:
                  throw new IllegalArgumentException("Unsupported protocol " + resourceURL.getProtocol() + " for resource " + resourceURL);
          }
      }