[java frontend] fix infinite loop
[java frontend] fix infinite loop

Reviewed By: jeremydubreil

Differential Revision: D4953057

fbshipit-source-id: ef5d21c

ryoon/infer,jvillard/infer,ropas/infer,facebook/infer,jvillard/infer,facebook/infer,blzq/infer,facebook/infer,ryoon/infer,ropas/infer,jvillard/infer,ryoon/infer,jvillard/infer,blzq/infer,ropas/infer,jvillard/infer,ropas/infer,ryoon/infer,ropas/infer,blzq/infer,facebook/infer,facebook/infer,blzq/infer,facebook/infer,ryoon/infer,ryoon/infer,blzq/infer,jvillard/infer,ropas/infer,facebook/infer,blzq/infer,jvillard/infer