> Also I've seen a lot of "final"
used in the code. Please don't use them since they're unnecessary and bad in most
cases and we don't have any best practice to use them in methods for ex (this
prevents extensibility). As for variables I don't see the point at all.
I can remove the final annotation on the methods, I think it's important however to
differentiate between clean extensibility and using "extends" to monkey patch
code in ways that weren't intended.
As for variables and fields, I am very fond of making those final because they are inline
documentation and verification.
I declare my intent not to change a variable with the final keyword, the
reader/maintainer knows what I meant and the compiler checks that I didn't make a
mistake.
If you want me to strip those, I can but think it's like stripping comments.
Caleb
>
> Re the fail fast I was expecting some event listener listening on Application started
event to check if the directories were writable for example and throw some exception if
not.
>
> Thanks
> -Vincent
>
>> Caleb
>>
>>
>> On 04/23/2012 09:43 AM, Caleb James DeLisle wrote:
>>> Hi,
>>>
>>> In order to fix XWIKI-7748 and XWIKI-7749, we need a plan for deleting
temporary file.
>>> XWikiAttachmentContent uses File.deleteOnExit(), but in Sun's
implementation, deleteOnExit()
>>> only deletes on a *clean* exit, in a crash it can't delete the files but
it doesn't tag them
>>> so they can be deleted in the next run either. Since temp files are usually
pseudo-randomly
>>> named, they are impossible to find and delete later.
>>>
>>> I propose that we create a subdirectory, `java.io.tmpdir`/xwiki/ which will
be removed on
>>> application exit. If the jvm crashes, the files will be removed next time
around. Then alter
>>> ApplicationContext.getTemporaryDirectory() to yield this directory.
>>>
>>> WDYT?
>>>
>>> Caleb
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org