Taken from JRE #1907 POP6: source