@SuppressWarnings("deprecation") private static final URL toURL(String location,boolean file){
  if (file) {
    File f=new File(location);
    if (f.exists()) {
      try {
        return f.toURL();
      }
 catch (      MalformedURLException murl) {
        return null;
      }
    }
 else {
      return null;
    }
  }
 else {
    return getURL(location);
  }
}

@ SuppressWarnings ( "deprecation" ) private static final URL toURL ( String location , boolean file ) { if ( file ) { File f = new File ( location ) ; if ( f . exists ( ) ) { try { return f . toURL ( ) ; } catch ( MalformedURLException murl ) { return null ; } } else { return null ; } } else { return getURL ( location ) ; } }
makes a url out of a location , as either a file or a resource .
