Re: RFR of JDK-8210802,temp files left by tests in jdk/java/net/httpclient

2018-09-17 Thread Chris Hegarty
On 17/09/18 11:56, Hamlin Li wrote: Hi Chris, Thank you for review. I agree with you. I think we only need to address the issue in EchoHandler.java, where the temp file is created in default path rather than the path in test scratch. updated webrev: http://cr.openjdk.java.net/~mli/8210802/we

Re: RFR of JDK-8210802,temp files left by tests in jdk/java/net/httpclient

2018-09-17 Thread Hamlin Li
Hi Chris, Thank you for review. I agree with you. I think we only need to address the issue in EchoHandler.java, where the temp file is created in default path rather than the path in test scratch. updated webrev: http://cr.openjdk.java.net/~mli/8210802/webrev.01/ Thank you -Hamlin On 201

Re: RFR of JDK-8210802,temp files left by tests in jdk/java/net/httpclient

2018-09-17 Thread Chris Hegarty
Cleaning up in tests is always problematic, since tests often run in environments where such cleaning actions are not performed immediately. Just look at the hoops that we go through to delete files ( and directories ) in test/lib/jdk/test/lib/util/FileUtils.java, that I added a few years ago.

RE: RFR of JDK-8210802,temp files left by tests in jdk/java/net/httpclient

2018-09-17 Thread Langer, Christoph
018 11:02 > To: Langer, Christoph > Cc: OpenJDK Network Dev list > Subject: Re: RFR of JDK-8210802,temp files left by tests in > jdk/java/net/httpclient > > Hi Christoph, > > Thank you for review. > > Normally I prefer to use "finally" too. > > Bu

Re: RFR of JDK-8210802,temp files left by tests in jdk/java/net/httpclient

2018-09-17 Thread Hamlin Li
Hi Christoph, Thank you for review. Normally I prefer to use "finally" too. But for this case, it's simpler to use deleteOnExit(), and for TestUtil.java and Driver.java it can not use "finally", because the temp files will be used outside of methods. If you insist on "finally" I can modify

RE: RFR of JDK-8210802,temp files left by tests in jdk/java/net/httpclient

2018-09-17 Thread Langer, Christoph
Hi Hamlin, wouldn't it be better/cleaner to move the deletion of files into finally blocks? But I guess one can do it with deleteOnExit() as well... Best regards Christoph > -Original Message- > From: net-dev On Behalf Of Hamlin Li > Sent: Montag, 17. September 2018 07:55 > To: OpenJDK