remove unused java 7 reference

use MAX_ALLOWED_STRING_SIZE