ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Александр Меньшиков <sharple...@gmail.com>
Subject Re: IGNITE-4713 : refactoring of GridFinishedFuture and GridFutureAdapter
Date Fri, 17 Feb 2017 10:56:43 GMT

I see only one place where writes in resFlag:

                if (err != null) {
                    resFlag = ERR;
                    this.res = err;
                else {
                    resFlag = RES;
                    this.res = res;

And the comparison with only two values: "ERR" and "RES". Except "assert
resFlag != 0;". So if this "assert" protect from call "get0" before call
"onDone" I think will be clearer to set some ready flag or use "enum" type.
And throw IllegalStateException if condition is false, because right now
developer will not get clear error massage.

17 февр. 2017 г. 11:34 пользователь "Alexey Goncharuk" <
alexey.goncharuk@gmail.com> написал:


This change is not applicable for GridFutureAdapter because resFlag can
have 3 values there.

2017-02-16 19:58 GMT+03:00 Александр Меньшиков <sharplermc@gmail.com>:

> Hello.
> I propose to do refactoring of classes "GridFinishedFuture" and
> "GridFutureAdapter". There is field "resFlag" which can equals "ERR = 1"
> "RES = 2". So I can replace it to one "bool haveResult" field.
> If there are no objections, I'm ready to proceed. If you find more such
> classes, please write about them.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message