removed a redundant var in JavaWriter.flagsToStr

the variable x was assigned to, but was never used.
Merge pull request #2262 from mesagie/patch-4

removed a redundant var in JavaWriter.flagsToStr