Get rid of call to a deprecated method.
Get rid of call to a deprecated method.

Use try-with instead and convert to stream/collector.


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1823895 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: d502f692f193f497c4d3170a494fdc6b04129d7e
etnetera/jmeter,benbenw/jmeter,apache/jmeter,benbenw/jmeter,ham1/jmeter,apache/jmeter,apache/jmeter,etnetera/jmeter,ham1/jmeter,etnetera/jmeter,ham1/jmeter,etnetera/jmeter,benbenw/jmeter,apache/jmeter,etnetera/jmeter,ham1/jmeter,benbenw/jmeter,ham1/jmeter,apache/jmeter