Remove use of class introduced in JDK 1.7

Otherwise it wouldn't compile in the integration server. The
possibility of increasing Java version requirement to JDK 7 should be
considered.
Use utility method