Archive for July 2013

Arrays.asList() – Why You Should Wrap It

oh noes!
I was trying to get the difference of two lists of files when a wild UnsupportedOperationException appeared!

My code looked a lil’ something like this:

List<File> listOfOtherFiles = Arrays.asList(otherDirectory.listFiles());
List<File> fileList = Arrays.asList(directory.listFiles());

The culprit: Arrays.asList(). Read more

How To Migrate A Git Repository To A New Server

Admittedly, it took me a while (and a couple of attempts) to clone a bunch of git repos from an old server and put them up on a new one. These are the steps I took to copy a working git repository from the old server and put it up on another server complete with history, branches, and tags. Read more