Fixed issue #3083 (java6 compatibility)