very smart way to solve it, thank you very much
On Wednesday, February 12, 2014 9:16:26 PM UTC+11, Jens wrote:
>
> i can't use the new Gwt version, so is this the right way to do:
>>
>> try {
>> registration.removeHandler();
>> } catch (AssertionError ae) {
>> // log, or ignore, or whatever
>> }
>>
>>
> If I were you I would make sure that reg.removeHandler() is only called
> once. If it's called more than once it sounds like a potential code issue
> to me. If you absolutely can not avoid it then you should do:
>
> if(reg != null) {
> reg.removeHandler();
> reg = null;
> }
>
> because catching (and swallowing) all AssertionErrors is really a bad idea.
>
> -- J.
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.