taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stian Soiland-Reyes <st...@apache.org>
Subject Re: Fwd: [DISCUSS] Release Candidate 4 of taverna-language-0.15.1 and taverna-osgi-0.2.1
Date Wed, 24 Feb 2016 15:00:45 GMT
As Dmitry pointed out, the ZipFile block can be moved up to before the
Bundle is opened.

On 24 February 2016 at 10:53, Ian Dunlop <ian.dunlop@manchester.ac.uk> wrote:
> Hello,
>
> Autoclose using try-with-resources works perfectly. I've pushed the code
> into the repo.
>
> Cheers,
>
> Ian
>
> On 24/02/2016 09:28, Stian Soiland-Reyes wrote:
>> That's a good question.. I think the validator was trying to check if the
>> zip entries match the manifest, but then it should probably do the manual
>> zip listing before opening the zip as a bundle. Is that right, Menaka?
>>
>> So then I think this is a real bug in that the validator doesn't close the
>> zip file, and so on Windows the file will be locked and can't be deleted as
>> the test finishes.
>>
>> Perhaps move to a separate autoclose block just for the zip file listing? I
>> think it keeps the list as strings within the Validator.
>> On 23 Feb 2016 17:27, "Dmitry" <redmitry@list.ru> wrote:
>>
>>> It should.
>>>
>>>
>>> https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html
>>>
>>> The question is WHY the zip code is WITHIN bundle try/catch?
>>>
>>> Dmitry
>>>
>>> On 2/23/2016 6:02 PM, alaninmcr wrote:
>>>
>>>> On 23/02/2016 15:38, Ian Dunlop wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I add zip.close() to the validate code and it built ok. Code fragment
>>>>> below. Shall I commit it to master and then we can start the release
>>>>> process again? Or am I missing something?
>>>>>
>>>>
>>>> If the declaration of the ZipFile is moved inside the try, Java 8 should
>>>> (from my reading of the documentation) auto-close it. Perhaps the handling
>>>> of autoclose is different according to the OS.
>>>>
>>>> Cheers,
>>>>>
>>>>> Ian
>>>>>
>>>>
>>>> Alan
>>>>
>>>>
>>>>
>>>
>>
>
> --
> Ian Dunlop, eScience Lab
> School of Computer Science
> The University of Manchester
> http://orcid.org/0000-0001-7066-3350



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/0000-0001-9842-9718

Mime
View raw message