Add synchronized to Deflater.needsInput()

Ported from openjdk8u121

changeset:   11054:c982997a738b
user:        coffeys
date:        Thu Oct 15 14:41:37 2015 +0100
summary:     8038502: Deflater.needsInput() should use synchronization

Test: CtsLibcoreTestCases
Bug: 31028374
Change-Id: I9c480bab4a35ec3f6bd431bc5ccdd5ff7e39440d
1 file changed