move java 7 dependent code to core, so util works with java 6