Skip to content

Instantly share code, notes, and snippets.

@hendrikstill
Created July 25, 2013 09:37
Show Gist options
  • Save hendrikstill/6078275 to your computer and use it in GitHub Desktop.
Save hendrikstill/6078275 to your computer and use it in GitHub Desktop.
Generic ArrayList to Array
ArrayList<URL> allURLs = new ArrayList<URL>();
//...
URL[] result = new URL[allURLs.size()];
return new URLClassLoader(allURLs.toArray(result), getClass().getClassLoader());
//Source EclipseFileManager.jave (jdt.compiler.tool) line 268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment