code: private boolean isSourceNewer(URL source, ClassNode cls) {
          try {
              long lastMod;
  
              // Special handling for file:// protocol, as getLastModified() often reports
              // incorrect results (-1)
              if (source.getProtocol().equals("file")) {
                  // Coerce the file URL to a File
                  String path = source.getPath().replace('/', File.separatorChar).replace('|', ':');
                  File file = new File(path);
                  lastMod = file.lastModified();
              } else {
                  URLConnection conn = source.openConnection();
                  lastMod = conn.getLastModified();
                  conn.getInputStream().close();
              }
              return lastMod > getTimeStamp(cls);
          } catch (IOException e) {
              // if the stream can't be opened, let's keep the old reference
              return false;
          }
      }
docs: returns true if the source in URL is newer than the class
  NOTE: copied from GroovyClassLoader