from java6 to java7