I can see that most of the new usages (e.g. Optional.java) is incorrect.
Can you guys fix those?
On Mon, May 9, 2016 at 2:12 PM, Goktug Gokdogan wrote:
>
>
> On Mon, May 9, 2016 at 12:52 PM, Jens wrote:
>
>> Hm ok, I think I got it. I would say my
On Mon, May 9, 2016 at 12:52 PM, Jens wrote:
> Hm ok, I think I got it. I would say my Arrays.sort() example should
> actually use a critical check then because array.slice() can do lots
> unexpected things (negative indexes for either argument works but results
> an
Hm ok, I think I got it. I would say my Arrays.sort() example should
actually use a critical check then because array.slice() can do lots
unexpected things (negative indexes for either argument works but results
an unexpected subset of array items to be sorted, toIndex can be larger
than
Thanks for asking; I think I never explained this well.
This is mostly judgement call but in general the rule of thumb is:
- Assume no checks as the starting point
- Look at the code and see what will happen if we don't have the check:
- If the missing check will leave the object in a very
Sometimes I am not sure if we should use a normal or a critical check.
Basically my understanding is that we should use a normal check if the code
would also fail (but obviously with a JS error instead of a required Java
Exception) with an error if the check was not present. If the code would